Skip to content

Commit

Permalink
Renaming to paimon
Browse files Browse the repository at this point in the history
  • Loading branch information
JingsongLi committed Mar 20, 2023
1 parent f09ea51 commit df24eff
Show file tree
Hide file tree
Showing 41 changed files with 170 additions and 172 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Flink Table Store Trino
# Paimon Trino

Because Trino's dependency is JDK 11, it is not possible to include the trino connector in [flink-table-store](https://github.com/apache/flink-table-store).
Because Trino's dependency is JDK 11, it is not possible to include the trino connector in [Paimon](https://github.com/apache/incubator-paimon).

## Deploy Table Store Trino Connector

Expand All @@ -13,7 +13,7 @@ Building Table Store Trino Bundled Jar is by running:

NOTE: For JDK 17, when [Deploying Trino](https://trino.io/docs/current/installation/deployment.html), should add jvm options: `--add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED`

Then, copy `target/flink-table-store-trino-*.jar` and [flink-shaded-hadoop-2-uber-2.8.3-10.0.jar](https://repo.maven.apache.org/maven2/org/apache/flink/flink-shaded-hadoop-2-uber/2.8.3-10.0/flink-shaded-hadoop-2-uber-2.8.3-10.0.jar)
Then, copy `target/paimon-trino-*.jar` and [flink-shaded-hadoop-2-uber-2.8.3-10.0.jar](https://repo.maven.apache.org/maven2/org/apache/flink/flink-shaded-hadoop-2-uber/2.8.3-10.0/flink-shaded-hadoop-2-uber-2.8.3-10.0.jar)
to `plugin/tablestore`.

## Configure Table Store Catalog
Expand Down
15 changes: 7 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ under the License.
<version>23</version>
</parent>

<groupId>org.apache.flink</groupId>
<artifactId>flink-table-store-trino</artifactId>
<name>Flink Table Store : Trino</name>
<groupId>org.apache.paimon</groupId>
<artifactId>paimon-trino</artifactId>
<name>Paimon : Trino</name>
<version>0.4-SNAPSHOT</version>

<packaging>jar</packaging>
Expand All @@ -45,10 +45,9 @@ under the License.
</properties>

<dependencies>
<!-- Flink All dependencies -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-store-shade</artifactId>
<groupId>org.apache.paimon</groupId>
<artifactId>paimon-shade</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down Expand Up @@ -234,7 +233,7 @@ under the License.
<configuration>
<artifactSet>
<includes combine.children="append">
<include>org.apache.flink:flink-table-store-shade</include>
<include>org.apache.paimon:paimon-shade</include>
<include>org.slf4j:slf4j-api</include>
<include>org.xerial.snappy:snappy-java</include>
<include>org.apache.commons:commons-lang3</include>
Expand All @@ -252,7 +251,7 @@ under the License.
<!-- The ApacheNoticeResourceTransformer collects and aggregates NOTICE files -->
<transformer
implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
<projectName>Apache Flink</projectName>
<projectName>Apache Paimon</projectName>
<encoding>UTF-8</encoding>
</transformer>
</transformers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.airlift.slice.Slice;
import java.math.BigInteger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.connector.ConnectorFactory;
import io.trino.spi.connector.ConnectorHandleResolver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.connector.ColumnHandle;
import io.trino.spi.connector.ConnectorHandleResolver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import org.apache.flink.table.store.options.Options;
import org.apache.paimon.options.Options;

public class TrinoMetadata extends TrinoMetadataBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.connector.ColumnHandle;

import org.apache.flink.table.store.data.InternalRow;
import org.apache.flink.table.store.reader.RecordReader;
import org.apache.paimon.data.InternalRow;
import org.apache.paimon.reader.RecordReader;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.connector.ConnectorSession;
import io.trino.spi.connector.ConnectorSplitSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.connector.ConnectorPartitionHandle;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.type.Int128;
import java.math.BigInteger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

public class TrinoConnectorFactory extends TrinoConnectorFactoryBase {
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import org.apache.flink.table.store.options.Options;
import org.apache.paimon.options.Options;

public class TrinoMetadata extends TrinoMetadataBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.connector.ColumnHandle;

import org.apache.flink.table.store.data.InternalRow;
import org.apache.flink.table.store.reader.RecordReader;
import org.apache.paimon.data.InternalRow;
import org.apache.paimon.reader.RecordReader;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.connector.ConnectorSession;
import io.trino.spi.connector.ConnectorSplitManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.connector.ConnectorPartitionHandle;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.type.Int128;
import java.math.BigInteger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

public class TrinoConnectorFactory extends TrinoConnectorFactoryBase {
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import org.apache.flink.table.store.options.Options;
import org.apache.paimon.options.Options;

public class TrinoMetadata extends TrinoMetadataBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.connector.ColumnHandle;

import org.apache.flink.table.store.data.InternalRow;
import org.apache.flink.table.store.reader.RecordReader;
import org.apache.paimon.data.InternalRow;
import org.apache.paimon.reader.RecordReader;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.connector.ConnectorSession;
import io.trino.spi.connector.ConnectorSplitSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import java.util.List;
import java.util.concurrent.CompletableFuture;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import java.util.function.Supplier;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import org.apache.flink.table.store.utils.InstantiationUtil;
import org.apache.paimon.utils.InstantiationUtil;


import java.util.Base64;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import org.apache.flink.table.store.types.DataField;
import org.apache.flink.table.store.types.RowType;
import org.apache.paimon.types.DataField;
import org.apache.paimon.types.RowType;


import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.trino.spi.connector.ColumnHandle;
import io.trino.spi.connector.ColumnMetadata;
import io.trino.spi.type.Type;

import org.apache.flink.table.store.file.utils.JsonSerdeUtil;
import org.apache.flink.table.store.types.DataType;
import org.apache.flink.table.store.types.DataTypeJsonParser;
import org.apache.paimon.utils.JsonSerdeUtil;
import org.apache.paimon.types.DataType;
import org.apache.paimon.types.DataTypeJsonParser;


import static java.util.Objects.requireNonNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import io.trino.spi.connector.Connector;
import io.trino.spi.connector.ConnectorTransactionHandle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import org.apache.flink.table.store.options.Options;
import org.apache.paimon.options.Options;

import java.util.Map;

Expand All @@ -30,7 +30,7 @@
public abstract class TrinoConnectorFactoryBase implements ConnectorFactory {
@Override
public String getName() {
return "tablestore";
return "paimon";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
* limitations under the License.
*/

package org.apache.flink.table.store.trino;
package org.apache.paimon.trino;

import org.apache.flink.table.store.data.BinaryString;
import org.apache.flink.table.store.data.Decimal;
import org.apache.flink.table.store.data.Timestamp;
import org.apache.flink.table.store.file.predicate.Predicate;
import org.apache.flink.table.store.file.predicate.PredicateBuilder;
import org.apache.flink.table.store.types.RowType;
import org.apache.paimon.data.BinaryString;
import org.apache.paimon.data.Decimal;
import org.apache.paimon.data.Timestamp;
import org.apache.paimon.predicate.Predicate;
import org.apache.paimon.predicate.PredicateBuilder;
import org.apache.paimon.types.RowType;

import io.airlift.slice.Slice;
import io.trino.spi.predicate.Domain;
Expand Down Expand Up @@ -56,8 +56,8 @@
import static java.lang.Float.intBitsToFloat;
import static java.lang.Math.toIntExact;
import static java.util.Objects.requireNonNull;
import static org.apache.flink.table.store.file.predicate.PredicateBuilder.and;
import static org.apache.flink.table.store.file.predicate.PredicateBuilder.or;
import static org.apache.paimon.predicate.PredicateBuilder.and;
import static org.apache.paimon.predicate.PredicateBuilder.or;

/** Trino filter to flink predicate. */
public class TrinoFilterConverter {
Expand Down
Loading

0 comments on commit df24eff

Please sign in to comment.