This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git
The following commit(s) were added to refs/heads/master by this push:
new dd01fd9d5 [doc] Update document for trino and presto (#1091)
dd01fd9d5 is described below
commit dd01fd9d5c7dcd0a3cb19aa3382ec9f855fbc6ee
Author: s7monk <[email protected]>
AuthorDate: Tue May 9 11:11:19 2023 +0800
[doc] Update document for trino and presto (#1091)
---
docs/config.toml | 4 +
docs/content/engines/hive.md | 2 +-
docs/content/engines/overview.md | 2 +-
docs/content/engines/presto.md | 137 +++++++++--
docs/content/engines/spark3.md | 6 +-
docs/content/engines/trino.md | 261 ++++++++++++++++++++-
docs/content/how-to/altering-tables.md | 50 ++++
docs/content/how-to/creating-tables.md | 52 ++++
docs/content/how-to/querying-tables.md | 10 +
.../shortcodes/presto_github_repo.html} | 21 +-
.../shortcodes/trino_github_repo.html} | 21 +-
11 files changed, 515 insertions(+), 51 deletions(-)
diff --git a/docs/config.toml b/docs/config.toml
index 920fe1395..a88d5dfbb 100644
--- a/docs/config.toml
+++ b/docs/config.toml
@@ -48,6 +48,10 @@ pygmentsUseClasses = true
GithubRepo = "https://github.com/apache/incubator-paimon.git"
+ TrinoGithubRepo = "https://github.com/apache/incubator-paimon-trino.git"
+
+ PrestoGithubRepo = "https://github.com/apache/incubator-paimon-presto.git"
+
# This suffix is appended to the Scala-dependent Maven artifact names
ScalaVersion = "_2.12"
diff --git a/docs/content/engines/hive.md b/docs/content/engines/hive.md
index 44606cb50..68ce4caec 100644
--- a/docs/content/engines/hive.md
+++ b/docs/content/engines/hive.md
@@ -230,7 +230,7 @@ OK
## Hive Type Conversion
-This section lists all supported type conversion between Hive and Flink.
+This section lists all supported type conversion between Hive and Paimon.
All Hive's data types are available in package
`org.apache.hadoop.hive.serde2.typeinfo`.
<table class="table table-bordered">
diff --git a/docs/content/engines/overview.md b/docs/content/engines/overview.md
index 9f620c1c5..f6c6da232 100644
--- a/docs/content/engines/overview.md
+++ b/docs/content/engines/overview.md
@@ -38,7 +38,7 @@ Apache Spark and Apache Hive.
| Spark | 3.1 - 3.4 | ✅ | ✅ | ✅ | ✅
| ❌ | ❌ | ❌ |
| Hive | 2.1 - 3.1 | ✅ | ✅ | ✅ | ❌
| ❌ | ❌ | ❌ |
| Spark | 2.4 | ✅ | ❌ | ❌ | ❌
| ❌ | ❌ | ❌ |
-| Trino | 358 - 400 | ✅ | ❌ | ❌ | ❌
| ❌ | ❌ | ❌ |
+| Trino | 358 - 400 | ✅ | ❌ | ✅ | ✅
| ❌ | ❌ | ❌ |
| Presto | 0.236 - 0.279 | ✅ | ❌ | ❌ | ❌
| ❌ | ❌ | ❌ |
Ongoing engines:
diff --git a/docs/content/engines/presto.md b/docs/content/engines/presto.md
index 3fadb6a57..84d2c3694 100644
--- a/docs/content/engines/presto.md
+++ b/docs/content/engines/presto.md
@@ -24,6 +24,8 @@ specific language governing permissions and limitations
under the License.
-->
+# Presto
+
This documentation is a guide for using Paimon in Presto.
## Version
@@ -36,27 +38,27 @@ Paimon currently supports Presto 0.236 and above.
Download the jar file with corresponding version.
-| Version | Jar
|
-|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| [0.236,0.268) | [paimon-presto-0.236-{{< version
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-presto-0.236/{{<
version >}}/paimon-presto-0.236-{{< version >}}.jar) |
-| [0.268,0.273) | [paimon-presto-0.268-{{< version
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-presto-0.268/{{<
version >}}/paimon-presto-0.268-{{< version >}}.jar) |
-| [0.273,0.279] | [paimon-presto-0.273-{{< version
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-presto-0.273/{{<
version >}}/paimon-presto-0.273-{{< version >}}.jar) |
+| Version | Jar
|
+|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| [0.236, 0.268) | [paimon-presto-0.236-{{< version
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-presto-0.236/{{<
version >}}/paimon-presto-0.236-{{< version >}}.jar) |
+| [0.268, 0.273) | [paimon-presto-0.268-{{< version
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-presto-0.268/{{<
version >}}/paimon-presto-0.268-{{< version >}}.jar) |
+| [0.273, latest] | [paimon-presto-0.273-{{< version
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-presto-0.273/{{<
version >}}/paimon-presto-0.273-{{< version >}}.jar) |
{{< /stable >}}
{{< unstable >}}
-| Version | Jar
|
-|------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
-| [0.236,0.268) | [paimon-presto-0.236-{{< version
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-presto-0.236/{{<
version >}}/) |
-| [0.268,0.273) | [paimon-presto-0.268-{{< version
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-presto-0.268/{{<
version >}}/) |
-| [0.273,0.279] | [paimon-presto-0.273-{{< version
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-presto-0.273/{{<
version >}}/) |
+| Version | Jar
|
+|----------------|-------------------------------------------------------------------------------------------------------------------------------------------|
+| [0.236, 0.268) | [paimon-presto-0.236-{{< version
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-presto-0.236/{{<
version >}}/) |
+| [0.268, 0.273) | [paimon-presto-0.268-{{< version
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-presto-0.268/{{<
version >}}/) |
+| [0.273, latest] | [paimon-presto-0.273-{{< version
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-presto-0.273/{{<
version >}}/) |
{{< /unstable >}}
-You can also manually build bundled jar from the source code.
+You can also manually build a bundled jar from the source code.
-To build from source code, [clone the git repository]({{< github_repo >}}).
+To build from the source code, [clone the git repository]({{<
presto_github_repo >}}).
Build bundled jar with the following command.
@@ -64,7 +66,7 @@ Build bundled jar with the following command.
mvn clean install -DskipTests
```
-You can find Presto connector jar in
`./paimon-presto/paimon-presto-<presto-version>/target/paimon-presto-*.jar`.
+You can find Presto connector jar in
`./paimon-presto-<presto-version>/target/paimon-presto-*.jar`.
Then, copy `paimon-presto-*.jar and flink-shaded-hadoop-*-uber-*.jar` to
plugin/paimon.
@@ -94,4 +96,111 @@ security.kerberos.login.keytab=/etc/presto/hdfs.keytab
```
SELECT * FROM paimon.default.MyTable
-```
\ No newline at end of file
+```
+
+## Presto to Paimon type mapping
+
+This section lists all supported type conversion between Presto and Paimon.
+All Presto's data types are available in package `
com.facebook.presto.common.type`.
+
+<table class="table table-bordered">
+ <thead>
+ <tr>
+ <th class="text-left" style="width: 10%">Presto Data Type</th>
+ <th class="text-left" style="width: 10%">Paimon Data Type</th>
+ <th class="text-left" style="width: 5%">Atomic Type</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>RowType</code></td>
+ <td><code>RowType</code></td>
+ <td>false</td>
+ </tr>
+ <tr>
+ <td><code>MapType</code></td>
+ <td><code>MapType</code></td>
+ <td>false</td>
+ </tr>
+ <tr>
+ <td><code>ArrayType</code></td>
+ <td><code>ArrayType</code></td>
+ <td>false</td>
+ </tr>
+ <tr>
+ <td><code>BooleanType</code></td>
+ <td><code>BooleanType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>TinyintType</code></td>
+ <td><code>TinyIntType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>SmallintType</code></td>
+ <td><code>SmallIntType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>IntegerType</code></td>
+ <td><code>IntType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>BigintType</code></td>
+ <td><code>BigIntType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>RealType</code></td>
+ <td><code>FloatType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>DoubleType</code></td>
+ <td><code>DoubleType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>CharType(length)</code></td>
+ <td><code>CharType(length)</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>VarCharType(VarCharType.MAX_LENGTH)</code></td>
+ <td><code>VarCharType(VarCharType.MAX_LENGTH)</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>VarCharType(length)</code></td>
+ <td><code>VarCharType(length), length is less than
VarCharType.MAX_LENGTH</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>DateType</code></td>
+ <td><code>DateType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>TimestampType</code></td>
+ <td><code>TimestampType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>DecimalType(precision, scale)</code></td>
+ <td><code>DecimalType(precision, scale)</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>VarBinaryType(length)</code></td>
+ <td><code>VarBinaryType(length)</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>TimestampWithTimeZoneType</code></td>
+ <td><code>LocalZonedTimestampType</code></td>
+ <td>true</td>
+ </tr>
+ </tbody>
+</table>
\ No newline at end of file
diff --git a/docs/content/engines/spark3.md b/docs/content/engines/spark3.md
index 60c43330b..d974c7f3a 100644
--- a/docs/content/engines/spark3.md
+++ b/docs/content/engines/spark3.md
@@ -155,14 +155,14 @@ spark.sql("SELECT * FROM my_table").show()
## Spark Type Conversion
-This section lists all supported type conversion between Spark and Flink.
+This section lists all supported type conversion between Spark and Paimon.
All Spark's data types are available in package `org.apache.spark.sql.types`.
<table class="table table-bordered">
<thead>
<tr>
<th class="text-left" style="width: 10%">Spark Data Type</th>
- <th class="text-left" style="width: 10%">Flink Data Type</th>
+ <th class="text-left" style="width: 10%">Paimon Data Type</th>
<th class="text-left" style="width: 5%">Atomic Type</th>
</tr>
</thead>
@@ -248,6 +248,6 @@ All Spark's data types are available in package
`org.apache.spark.sql.types`.
{{< hint info >}}
- Currently, Spark's field comment cannot be described under Flink CLI.
-- Conversion between Spark's `UserDefinedType` and Flink's `UserDefinedType`
is not supported.
+- Conversion between Spark's `UserDefinedType` and Paimon's `UserDefinedType`
is not supported.
{{< /hint >}}
diff --git a/docs/content/engines/trino.md b/docs/content/engines/trino.md
index 37cb93a86..94fbffd1e 100644
--- a/docs/content/engines/trino.md
+++ b/docs/content/engines/trino.md
@@ -26,6 +26,263 @@ under the License.
# Trino
-Because Trino's dependency is JDK 11, it is not possible to include the trino
connector in [paimon](https://github.com/apache/incubator-paimon).
+This documentation is a guide for using Paimon in Trino.
-See [paimon-trino](https://github.com/JingsongLi/paimon-trino).
+## Version
+
+Paimon currently supports Trino 358 and above.
+
+## Preparing Paimon Jar File
+
+{{< stable >}}
+
+Download the jar file with corresponding version.
+
+| Version | Jar
|
+|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| [358, 368) | [paimon-trino-358-{{< version
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-trino-358/{{<
version >}}/paimon-trino-358-{{< version >}}.jar) |
+| [368, 369) | [paimon-trino-368-{{< version
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-trino-368/{{<
version >}}/paimon-trino-368-{{< version >}}.jar) |
+| [369, 370) | [paimon-trino-369-{{< version
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-trino-369/{{<
version >}}/paimon-trino-369-{{< version >}}.jar) |
+| [370, 388) | [paimon-trino-370-{{< version
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-trino-370/{{<
version >}}/paimon-trino-370-{{< version >}}.jar) |
+| [388, 393) | [paimon-trino-388-{{< version
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-trino-388/{{<
version >}}/paimon-trino-388-{{< version >}}.jar) |
+| [393, latest] | [paimon-trino-393-{{< version
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-trino-393/{{<
version >}}/paimon-trino-393-{{< version >}}.jar) |
+
+{{< /stable >}}
+
+{{< unstable >}}
+
+| Version | Jar
|
+|---------------|-------------------------------------------------------------------------------------------------------------------------------------|
+| [358, 368) | [paimon-trino-358-{{< version
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-trino-358/{{<
version >}}/) |
+| [368, 369) | [paimon-trino-368-{{< version
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-trino-368/{{<
version >}}/) |
+| [369, 370) | [paimon-trino-369-{{< version
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-trino-369/{{<
version >}}/) |
+| [370, 388) | [paimon-trino-370-{{< version
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-trino-370/{{<
version >}}/) |
+| [388, 393) | [paimon-trino-388-{{< version
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-trino-388/{{<
version >}}/) |
+| [393, latest] | [paimon-trino-393-{{< version
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-trino-393/{{<
version >}}/) |
+
+{{< /unstable >}}
+
+You can also manually build a bundled jar from the source code. However, there
are a few preliminary steps that need to be taken before compiling:
+
+- To build from the source code, [clone the git repository]({{<
trino_github_repo >}}).
+- Install JDK11 and JDK17 locally, and configure JDK11 as a global environment
variable;
+- Configure the toolchains.xml file in ${{ MAVEN_HOME }}, the content is as
follows.
+
+```
+ <toolchains>
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <version>17</version>
+ <vendor>adopt</vendor>
+ </provides>
+ <configuration>
+ <jdkHome>${{ JAVA_HOME }}</jdkHome>
+ </configuration>
+ </toolchain>
+ </toolchains>
+```
+
+Then,you can build bundled jar with the following command:
+
+```
+mvn clean install -DskipTests
+```
+
+You can find Trino connector jar in
`./paimon-trino-<trino-version>/target/paimon-trino-*.jar`.
+
+Then, copy `paimon-trino-*.jar and flink-shaded-hadoop-*-uber-*.jar` to
plugin/paimon.
+
+> NOTE: For JDK 17, when Deploying Trino, should add jvm options:
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.base/java.nio=ALL-UNNAMED
+
+## Configure Paimon Catalog
+
+Catalogs are registered by creating a catalog properties file in the
etc/catalog directory. For example, create etc/catalog/paimon.properties with
the following contents to mount the paimon connector as the paimon catalog:
+
+```
+connector.name=paimon
+warehouse=file:/tmp/warehouse
+```
+
+If you are using HDFS, choose one of the following ways to configure your HDFS:
+
+- set environment variable HADOOP_HOME.
+- set environment variable HADOOP_CONF_DIR.
+- configure fs.hdfs.hadoopconf in the properties.
+
+## Kerberos
+
+You can configure kerberos keytag file when using KERBEROS authentication in
the properties.
+
+```
+security.kerberos.login.principal=hadoop-user
+security.kerberos.login.keytab=/etc/trino/hdfs.keytab
+```
+
+Keytab files must be distributed to every node in the cluster that runs Trino.
+
+## Create Schema
+
+```
+CREATE SCHEMA paimon.test_db;
+```
+
+## Create Table
+
+```
+CREATE TABLE paimon.test_db.orders (
+ order_key bigint,
+ orders_tatus varchar,
+ total_price decimal(18,4),
+ order_date date
+)
+WITH (
+ file_format = 'ORC',
+ primary_key = ARRAY['order_key','order_date'],
+ partitioned_by = ARRAY['orderdate'],
+ bucket = '2',
+ bucket_key = 'order_key',
+ changelog_producer = 'input'
+)
+```
+
+## Add Column
+
+```
+CREATE TABLE paimon.test_db.orders (
+ order_key bigint,
+ orders_tatus varchar,
+ total_price decimal(18,4),
+ order_date date
+)
+WITH (
+ file_format = 'ORC',
+ primary_key = ARRAY['order_key','order_date'],
+ partitioned_by = ARRAY['orderdate'],
+ bucket = '2',
+ bucket_key = 'order_key',
+ changelog_producer = 'input'
+)
+
+ALTER TABLE paimon.test_db.orders ADD COLUMN "shipping_address varchar;
+```
+
+## Query
+
+```
+SELECT * FROM paimon.test_db.orders
+```
+
+## Query with Time Traveling
+
+```
+SET SESSION paimon.scan_timestamp_millis=1679486589444;
+SELECT * FROM paimon.test_db.orders;
+```
+
+## Trino to Paimon type mapping
+
+This section lists all supported type conversion between Trino and Paimon.
+All Trino's data types are available in package `io.trino.spi.type`.
+
+<table class="table table-bordered">
+ <thead>
+ <tr>
+ <th class="text-left" style="width: 10%">Trino Data Type</th>
+ <th class="text-left" style="width: 10%">Paimon Data Type</th>
+ <th class="text-left" style="width: 5%">Atomic Type</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>RowType</code></td>
+ <td><code>RowType</code></td>
+ <td>false</td>
+ </tr>
+ <tr>
+ <td><code>MapType</code></td>
+ <td><code>MapType</code></td>
+ <td>false</td>
+ </tr>
+ <tr>
+ <td><code>ArrayType</code></td>
+ <td><code>ArrayType</code></td>
+ <td>false</td>
+ </tr>
+ <tr>
+ <td><code>BooleanType</code></td>
+ <td><code>BooleanType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>TinyintType</code></td>
+ <td><code>TinyIntType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>SmallintType</code></td>
+ <td><code>SmallIntType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>IntegerType</code></td>
+ <td><code>IntType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>BigintType</code></td>
+ <td><code>BigIntType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>RealType</code></td>
+ <td><code>FloatType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>DoubleType</code></td>
+ <td><code>DoubleType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>CharType(length)</code></td>
+ <td><code>CharType(length)</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>VarCharType(VarCharType.MAX_LENGTH)</code></td>
+ <td><code>VarCharType(VarCharType.MAX_LENGTH)</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>VarCharType(length)</code></td>
+ <td><code>VarCharType(length), length is less than
VarCharType.MAX_LENGTH</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>DateType</code></td>
+ <td><code>DateType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>TimestampType</code></td>
+ <td><code>TimestampType</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>DecimalType(precision, scale)</code></td>
+ <td><code>DecimalType(precision, scale)</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>VarBinaryType(length)</code></td>
+ <td><code>VarBinaryType(length)</code></td>
+ <td>true</td>
+ </tr>
+ <tr>
+ <td><code>TimestampWithTimeZoneType</code></td>
+ <td><code>LocalZonedTimestampType</code></td>
+ <td>true</td>
+ </tr>
+ </tbody>
+</table>
diff --git a/docs/content/how-to/altering-tables.md
b/docs/content/how-to/altering-tables.md
index d322f8c36..a53a54906 100644
--- a/docs/content/how-to/altering-tables.md
+++ b/docs/content/how-to/altering-tables.md
@@ -52,6 +52,16 @@ ALTER TABLE my_table SET TBLPROPERTIES (
{{< /tab >}}
+{{< tab "Trino" >}}
+
+```sql
+ALTER TABLE my_table SET PROPERTIES write_buffer_size = '256 MB';
+```
+
+> NOTE: Versions below Trino 368 do not support changing/adding table
properties.
+
+{{< /tab >}}
+
{{< /tabs >}}
## Rename Table Name
@@ -76,6 +86,14 @@ ALTER TABLE my_table RENAME TO my_table_new;
{{< /tab >}}
+{{< tab "Trino" >}}
+
+```sql
+ALTER TABLE my_table RENAME TO my_table_new;
+```
+
+{{< /tab >}}
+
{{< /tabs >}}
{{< hint info >}}
@@ -133,6 +151,14 @@ ALTER TABLE my_table ADD COLUMNS (
{{< /tab >}}
+{{< tab "Trino" >}}
+
+```sql
+ALTER TABLE my_table ADD COLUMN c1 VARCHAR;
+```
+
+{{< /tab >}}
+
{{< /tabs >}}
## Adding Column Position
@@ -186,6 +212,14 @@ ALTER TABLE my_table RENAME COLUMN c0 TO c1;
{{< /tab >}}
+{{< tab "Trino" >}}
+
+```sql
+ALTER TABLE my_table RENAME COLUMN c0 TO c1;
+```
+
+{{< /tab >}}
+
{{< /tabs >}}
## Dropping Columns
@@ -210,6 +244,14 @@ ALTER TABLE my_table DROP COLUMNS (c1, c2);
{{< /tab >}}
+{{< tab "Trino" >}}
+
+```sql
+ALTER TABLE my_table DROP COLUMN c1;
+```
+
+{{< /tab >}}
+
{{< /tabs >}}
## Changing Column Nullability
@@ -305,4 +347,12 @@ ALTER TABLE my_table ALTER COLUMN col_a TYPE 'DOUBLE';
{{< /tab >}}
+{{< tab "Trino" >}}
+
+```sql
+ALTER TABLE my_table ALTER COLUMN col_a SET DATA TYPE DOUBLE;
+```
+
+{{< /tab >}}
+
{{< /tabs >}}
diff --git a/docs/content/how-to/creating-tables.md
b/docs/content/how-to/creating-tables.md
index b77766fd9..eaeeb9b8c 100644
--- a/docs/content/how-to/creating-tables.md
+++ b/docs/content/how-to/creating-tables.md
@@ -85,6 +85,22 @@ TBLPROPERTIES (
{{< /tab >}}
+{{< tab "Trino" >}}
+
+```sql
+CREATE TABLE MyTable (
+ user_id BIGINT,
+ item_id BIGINT,
+ behavior VARCHAR,
+ dt VARCHAR,
+ hh VARCHAR
+) WITH (
+ primary_key = ARRAY['dt', 'hh', 'user_id']
+);
+```
+
+{{< /tab >}}
+
{{< /tabs >}}
{{< hint info >}}
@@ -149,6 +165,23 @@ TBLPROPERTIES (
{{< /tab >}}
+{{< tab "Trino" >}}
+
+```sql
+CREATE TABLE MyTable (
+ user_id BIGINT,
+ item_id BIGINT,
+ behavior VARCHAR,
+ dt VARCHAR,
+ hh VARCHAR
+) WITH (
+ primary_key = ARRAY['dt', 'hh', 'user_id'],
+ partitioned_by = ARRAY['dt', 'hh']
+);
+```
+
+{{< /tab >}}
+
{{< /tabs >}}
{{< hint info >}}
@@ -371,6 +404,25 @@ TBLPROPERTIES (
{{< /tab >}}
+{{< tab "Trino" >}}
+
+```sql
+CREATE TABLE MyTable (
+ user_id BIGINT,
+ item_id BIGINT,
+ behavior VARCHAR,
+ dt VARCHAR,
+ hh VARCHAR
+) WITH (
+ primary_key = ARRAY['dt', 'hh', 'user_id'],
+ partitioned_by = ARRAY['dt', 'hh'],
+ bucket = '2',
+ bucket_key = 'user_id'
+);
+```
+
+{{< /tab >}}
+
{{< /tabs >}}
## Creating External Tables
diff --git a/docs/content/how-to/querying-tables.md
b/docs/content/how-to/querying-tables.md
index 6614b8fa7..cc215c74b 100644
--- a/docs/content/how-to/querying-tables.md
+++ b/docs/content/how-to/querying-tables.md
@@ -128,6 +128,16 @@ SELECT * FROM t TIMESTAMP AS OF 1678883047;
{{< /tab >}}
+{{< tab "Trino" >}}
+
+```sql
+-- travel to specified timestamp with a long value in milliseconds
+SET SESSION paimon.scan_timestamp_millis=1679486589444;
+SELECT * FROM t;
+```
+
+{{< /tab >}}
+
{{< /tabs >}}
## Consumer ID
diff --git a/docs/content/engines/trino.md
b/docs/layouts/shortcodes/presto_github_repo.html
similarity index 67%
copy from docs/content/engines/trino.md
copy to docs/layouts/shortcodes/presto_github_repo.html
index 37cb93a86..c39962279 100644
--- a/docs/content/engines/trino.md
+++ b/docs/layouts/shortcodes/presto_github_repo.html
@@ -1,11 +1,4 @@
----
-title: "Trino"
-weight: 6
-type: docs
-aliases:
-- /engines/trino.html
----
-<!--
+{{/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -14,7 +7,7 @@ to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
@@ -22,10 +15,8 @@ software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--->
+*/}}{{/*
+Shortcode that interpolates the the full github repo
-# Trino
-
-Because Trino's dependency is JDK 11, it is not possible to include the trino
connector in [paimon](https://github.com/apache/incubator-paimon).
-
-See [paimon-trino](https://github.com/JingsongLi/paimon-trino).
+Parmeters: None
+*/}}{{- $.Site.Params.PrestoGithubRepo -}}
\ No newline at end of file
diff --git a/docs/content/engines/trino.md
b/docs/layouts/shortcodes/trino_github_repo.html
similarity index 67%
copy from docs/content/engines/trino.md
copy to docs/layouts/shortcodes/trino_github_repo.html
index 37cb93a86..97466b765 100644
--- a/docs/content/engines/trino.md
+++ b/docs/layouts/shortcodes/trino_github_repo.html
@@ -1,11 +1,4 @@
----
-title: "Trino"
-weight: 6
-type: docs
-aliases:
-- /engines/trino.html
----
-<!--
+{{/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -14,7 +7,7 @@ to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
@@ -22,10 +15,8 @@ software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--->
+*/}}{{/*
+Shortcode that interpolates the the full github repo
-# Trino
-
-Because Trino's dependency is JDK 11, it is not possible to include the trino
connector in [paimon](https://github.com/apache/incubator-paimon).
-
-See [paimon-trino](https://github.com/JingsongLi/paimon-trino).
+Parmeters: None
+*/}}{{- $.Site.Params.TrinoGithubRepo -}}
\ No newline at end of file