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/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new a8a3751ab9 [doc] Fix doc with trino engine
a8a3751ab9 is described below

commit a8a3751ab9ad62aba6d6ba93d2e7d2dbc4b532e7
Author: Jingsong <[email protected]>
AuthorDate: Tue Nov 26 14:57:29 2024 +0800

    [doc] Fix doc with trino engine
---
 docs/content/engines/presto.md   | 321 ---------------------------------------
 docs/content/engines/trino.md    |  61 +++-----
 docs/content/project/download.md |  10 +-
 3 files changed, 27 insertions(+), 365 deletions(-)

diff --git a/docs/content/engines/presto.md b/docs/content/engines/presto.md
deleted file mode 100644
index c336226bcf..0000000000
--- a/docs/content/engines/presto.md
+++ /dev/null
@@ -1,321 +0,0 @@
----
-title: "Presto"
-weight: 6
-type: docs
-aliases:
-- /engines/presto.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
-regarding copyright ownership.  The ASF licenses this file
-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
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-# Presto
-
-This documentation is a guide for using Paimon in Presto.
-
-## Version
-
-Paimon currently supports Presto 0.236 and above.
-
-## Preparing Paimon Jar File
-
-{{< stable >}}
-
-Download from master:
-https://paimon.apache.org/docs/master/project/download/
-
-{{< /stable >}}
-
-{{< unstable >}}
-
-| Version         | Jar                                                        
                                                                                
         |
-|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
-| [0.236, 0.268)  | [paimon-presto-0.236-{{< version 
>}}-plugin.tar.gz](https://repository.apache.org/snapshots/org/apache/paimon/paimon-presto-0.236/{{<
 version >}}/) |
-| [0.268, 0.273)  | [paimon-presto-0.268-{{< version 
>}}-plugin.tar.gz](https://repository.apache.org/snapshots/org/apache/paimon/paimon-presto-0.268/{{<
 version >}}/) |
-| [0.273, latest] | [paimon-presto-0.273-{{< version 
>}}-plugin.tar.gz](https://repository.apache.org/snapshots/org/apache/paimon/paimon-presto-0.273/{{<
 version >}}/) |
-
-{{< /unstable >}}
-
-You can also manually build a bundled jar from the source code.
-
-To build from the source code, [clone the git repository]({{< 
presto_github_repo >}}).
-
-Build presto connector plugin with the following command.
-
-```
-mvn clean install -DskipTests
-```
-
-After the packaging is complete, you can choose the corresponding connector 
based on your own Presto version:
-
-| Version         | Package                                                    
                      |
-|-----------------|----------------------------------------------------------------------------------|
-| [0.236, 0.268)  | `./paimon-presto-0.236/target/paimon-presto-0.236-{{< 
version >}}-plugin.tar.gz` |
-| [0.268, 0.273)  | `./paimon-presto-0.268/target/paimon-presto-0.268-{{< 
version >}}-plugin.tar.gz` |
-| [0.273, latest] | `./paimon-presto-0.273/target/paimon-presto-0.273-{{< 
version >}}-plugin.tar.gz` |
-
-Of course, we also support different versions of Hive and Hadoop. But note 
that we utilize
-Presto-shaded versions of Hive and Hadoop packages to address dependency 
conflicts.
-You can check the following two links to select the appropriate versions of 
Hive and Hadoop:
-
-[hadoop-apache2](https://mvnrepository.com/artifact/com.facebook.presto.hadoop/hadoop-apache2)
-
-[hive-apache](https://mvnrepository.com/artifact/com.facebook.presto.hive/hive-apache)
-
-Both Hive 2 and 3, as well as Hadoop 2 and 3, are supported.
-
-For example, if your presto version is 0.274, hive and hadoop version is 2.x, 
you could run:
-
-```bash
-mvn clean install -DskipTests -am -pl paimon-presto-0.273 
-Dpresto.version=0.274 -Dhadoop.apache2.version=2.7.4-9 
-Dhive.apache.version=1.2.2-2
-```
-
-## Tmp Dir
-
-Paimon will unzip some jars to the tmp directory for codegen. By default, 
Presto will use `'/tmp'` as the temporary
-directory, but `'/tmp'` may be periodically deleted.
-
-You can configure this environment variable when Presto starts:
-```shell
--Djava.io.tmpdir=/path/to/other/tmpdir
-```
-
-Let Paimon use a secure temporary directory.
-
-## Configure Paimon Catalog
-
-### Install Paimon Connector
-
-```bash
-tar -zxf 
paimon-presto-${PRESTO_VERSION}/target/paimon-presto-${PRESTO_VERSION}-${PAIMON_VERSION}-plugin.tar.gz
 -C ${PRESTO_HOME}/plugin
-```
-
-Note that, the variable `PRESTO_VERSION` is module name, must be one of 0.236, 
0.268, 0.273.
-
-### Configuration
-
-```bash
-cd ${PRESTO_HOME}
-mkdir -p etc/catalog
-```
-
-```properties
-connector.name=paimon
-# set your filesystem path, such as hdfs://namenode01:8020/path and 
s3://${YOUR_S3_BUCKET}/path
-warehouse=${YOUR_FS_PATH}
-```
-
-If you are using HDFS FileSystem, you will also need to do one more thing: 
choose one of the following ways to configure your HDFS:
-
-- set environment variable HADOOP_HOME.
-- set environment variable HADOOP_CONF_DIR.
-- configure `hadoop-conf-dir` in the properties.
-
-If you are using S3 FileSystem, you need to add 
`paimon-s3-${PAIMON_VERSION}.jar` in `${PRESTO_HOME}/plugin/paimon` and 
additionally configure the following properties in `paimon.properties`:
-
-```properties
-s3.endpoint=${YOUR_ENDPOINTS}
-s3.access-key=${YOUR_AK}
-s3.secret-key=${YOUR_SK}
-```
-
-**Query HiveCatalog table:**
-
-```bash
-vim etc/catalog/paimon.properties
-```
-
-and set the following config:
-
-```properties
-connector.name=paimon
-# set your filesystem path, such as hdfs://namenode01:8020/path and 
s3://${YOUR_S3_BUCKET}/path
-warehouse=${YOUR_FS_PATH}
-metastore=hive
-uri=thrift://${YOUR_HIVE_METASTORE}:9083
-```
-
-## Kerberos
-
-You can configure kerberos keytab file when using KERBEROS authentication in 
the properties.
-
-```
-security.kerberos.login.principal=hadoop-user
-security.kerberos.login.keytab=/etc/presto/hdfs.keytab
-```
-
-Keytab files must be distributed to every node in the cluster that runs Presto.
-
-## Create Schema
-
-```
-CREATE SCHEMA paimon.test_db;
-```
-
-## Create Table
-
-```
-CREATE TABLE paimon.test_db.orders (
-    order_key bigint,
-    order_status varchar,
-    total_price decimal(18,4),
-    order_date date
-)
-WITH (
-    file_format = 'ORC',
-    primary_key = ARRAY['order_key','order_date'],
-    partitioned_by = ARRAY['order_date'],
-    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['order_date'],
-    bucket = '2',
-    bucket_key = 'order_key',
-    changelog_producer = 'input'
-)
-
-ALTER TABLE paimon.test_db.orders ADD COLUMN "shipping_address varchar;
-```
-
-## Query
-
-```
-SELECT * FROM paimon.default.MyTable
-```
-
-## 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>
diff --git a/docs/content/engines/trino.md b/docs/content/engines/trino.md
index 05fc47729d..bef10f9d28 100644
--- a/docs/content/engines/trino.md
+++ b/docs/content/engines/trino.md
@@ -30,7 +30,7 @@ This documentation is a guide for using Paimon in Trino.
 
 ## Version
 
-Paimon currently supports Trino 420 and above.
+Paimon currently supports Trino 440.
 
 ## Filesystem
 
@@ -40,26 +40,12 @@ filesystems for Trino on Trino official website.
 
 ## Preparing Paimon Jar File
 
-{{< stable >}}
-
-Download from master:
-https://paimon.apache.org/docs/master/project/download/
-
-{{< /stable >}}
-
-{{< unstable >}}
-
-| Version       | Package                                                      
                                                                                
 |
-|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
-| [420, 426]    | [paimon-trino-420-{{< version 
>}}-plugin.tar.gz](https://repository.apache.org/snapshots/org/apache/paimon/paimon-trino-420/{{<
 version >}}/) |
-| [427, latest] | [paimon-trino-427-{{< version 
>}}-plugin.tar.gz](https://repository.apache.org/snapshots/org/apache/paimon/paimon-trino-427/{{<
 version >}}/) |
-
-{{< /unstable >}}
+[Download]({{< ref "project/download" >}})
 
 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 JDK17 locally, and configure JDK17 as a global environment variable;
+- Install JDK21 locally, and configure JDK21 as a global environment variable;
 
 Then,you can build bundled jar with the following command:
 
@@ -78,28 +64,17 @@ For example, if you want to use Hadoop 3.3.5-1, you can use 
the following comman
 mvn clean install -DskipTests -Dhadoop.apache.version=3.3.5-1
 ```
 
-## Tmp Dir
-
-Paimon will unzip some jars to the tmp directory for codegen. By default, 
Trino will use `'/tmp'` as the temporary
-directory, but `'/tmp'` may be periodically deleted.
-
-You can configure this environment variable when Trino starts: 
-```shell
--Djava.io.tmpdir=/path/to/other/tmpdir
-```
-
-Let Paimon use a secure temporary directory.
-
 ## Configure Paimon Catalog
 
 ### Install Paimon Connector
 ```bash
 tar -zxf paimon-trino-<trino-version>-{{< version >}}-plugin.tar.gz -C 
${TRINO_HOME}/plugin
 ```
-the variable `trino-version` is module name, must be one of 420, 427.
-> 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`
+
+> NOTE: For JDK 21, 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
+
 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:
 
 ```
@@ -186,9 +161,6 @@ SELECT * FROM paimon.test_db.orders
 ```
 
 ## Query with Time Traveling
-{{< tabs "time-travel-example" >}}
-
-{{< tab "version >=420" >}}
 
 ```sql
 -- read the snapshot from specified timestamp
@@ -208,10 +180,15 @@ you have a tag named '1' based on snapshot 2, the 
statement `SELECT * FROM paimo
 instead of snapshot 1.
 {{< /hint >}}
 
-{{< /tab >}}
+## Insert
 
+```
+INSERT INTO paimon.test_db.orders VALUES (.....);
+```
 
-{{< /tabs >}}
+Supports:
+- primary key table with fixed bucket.
+- non-primary-key table with bucket -1.
 
 ## Trino to Paimon type mapping
 
@@ -319,3 +296,15 @@ All Trino's data types are available in package 
`io.trino.spi.type`.
     </tr>
     </tbody>
 </table>
+
+## Tmp Dir
+
+Paimon will unzip some jars to the tmp directory for codegen. By default, 
Trino will use `'/tmp'` as the temporary
+directory, but `'/tmp'` may be periodically deleted.
+
+You can configure this environment variable when Trino starts:
+```shell
+-Djava.io.tmpdir=/path/to/other/tmpdir
+```
+
+Let Paimon use a secure temporary directory.
diff --git a/docs/content/project/download.md b/docs/content/project/download.md
index 5e49811076..23d0112b09 100644
--- a/docs/content/project/download.md
+++ b/docs/content/project/download.md
@@ -49,13 +49,8 @@ This documentation is a guide for downloading Paimon Jars.
 | Hive 2.3         | [paimon-hive-connector-2.3-{{< version 
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-hive-connector-2.3/{{<
 version >}}/)                 |
 | Hive 2.2         | [paimon-hive-connector-2.2-{{< version 
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-hive-connector-2.2/{{<
 version >}}/)                 |
 | Hive 2.1         | [paimon-hive-connector-2.1-{{< version 
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-hive-connector-2.1/{{<
 version >}}/)                 |
-| Hive 2.1-cdh-6.3 | [paimon-hive-connector-2.1-cdh-6.3-{{< version 
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-hive-connector-2.1-cdh-6.3/{{<
 version >}}/) |
-| Presto 0.236     | [paimon-presto-0.236-{{< version 
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-presto-0.236/{{<
 version >}}/)                             |
-| Presto 0.268     | [paimon-presto-0.268-{{< version 
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-presto-0.268/{{<
 version >}}/)                             |
-| Presto 0.273     | [paimon-presto-0.273-{{< version 
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-presto-0.273/{{<
 version >}}/)                             |
-| Presto SQL 332   | [paimon-prestosql-332-{{< version 
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-prestosql-332/{{<
 version >}}/)                           |
-| Trino 420        | [paimon-trino-420-{{< version 
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-trino-420/{{<
 version >}}/)                                   |
-| Trino 427        | [paimon-trino-427-{{< version 
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-trino-427/{{<
 version >}}/)                                   |
+| Hive 2.1-cdh-6.3 | [paimon-hive-connector-2.1-cdh-6.3-{{< version 
>}}.jar](https://repository.apache.org/snapshots/org/apache/paimon/paimon-hive-connector-2.1-cdh-6.3/{{<
 version >}}/) | |
+| Trino 440        | [paimon-trino-440-{{< version 
>}}-plugin.tar.gz](https://repository.apache.org/content/repositories/snapshots/org/apache/paimon/paimon-trino-440/{{<
 version >}}/)              |
 
 {{< /unstable >}}
 
@@ -79,7 +74,6 @@ This documentation is a guide for downloading Paimon Jars.
 | Hive 2.2         | [paimon-hive-connector-2.2-{{< version 
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-hive-connector-2.2/{{<
 version >}}/paimon-hive-connector-2.2-{{< version >}}.jar)                     
    |
 | Hive 2.1         | [paimon-hive-connector-2.1-{{< version 
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-hive-connector-2.1/{{<
 version >}}/paimon-hive-connector-2.1-{{< version >}}.jar)                     
    |
 | Hive 2.1-cdh-6.3 | [paimon-hive-connector-2.1-cdh-6.3-{{< version 
>}}.jar](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-hive-connector-2.1-cdh-6.3/{{<
 version >}}/paimon-hive-connector-2.1-cdh-6.3-{{< version >}}.jar) |
-| Presto           | [Download from 
master](https://paimon.apache.org/docs/master/project/download/)                
                                                                                
                                         |
 | Trino            | [Download from 
master](https://paimon.apache.org/docs/master/project/download/)                
                                                                                
                                         |
 
 {{< /stable >}}

Reply via email to