This is an automated email from the ASF dual-hosted git repository.
yuqi4733 pushed a commit to branch branch-0.6
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/branch-0.6 by this push:
new fdaf9a10b [#4760] Improvement (docs): Correct errors in the Trino
connector document (#4769)
fdaf9a10b is described below
commit fdaf9a10b502b66010a5a1cbb3c3ad84cd9bd3a7
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Aug 29 16:00:00 2024 +0800
[#4760] Improvement (docs): Correct errors in the Trino connector document
(#4769)
### What changes were proposed in this pull request?
Correct errors in the Trino connector document
### Why are the changes needed?
Fix: #4760
### Does this PR introduce _any_ user-facing change?
No, update docs
### How was this patch tested?
No
Co-authored-by: Yuhui <[email protected]>
---
docs/trino-connector/catalog-hive.md | 4 +-
docs/trino-connector/catalog-iceberg.md | 25 ++++---
docs/trino-connector/catalog-mysql.md | 4 +-
docs/trino-connector/catalog-postgresql.md | 8 +--
docs/trino-connector/development.md | 105 ++++++++++++++++++++---------
5 files changed, 95 insertions(+), 51 deletions(-)
diff --git a/docs/trino-connector/catalog-hive.md
b/docs/trino-connector/catalog-hive.md
index 60b2e247e..72e70d3fd 100644
--- a/docs/trino-connector/catalog-hive.md
+++ b/docs/trino-connector/catalog-hive.md
@@ -91,7 +91,7 @@ statement.
Users can use the following example to create a schema with properties:
```sql
-CREATE SCHEMA "metalake.catalog".dbname
+CREATE SCHEMA catalog.dbname
WITH (
location = 'hdfs://hdfs-host:9000/user/hive/warehouse/dbname'
);
@@ -196,7 +196,7 @@ Query 20231017_082503_00018_6nt3n, FINISHED, 1 node
```
The `gravitino` catalog is a catalog defined By Trino catalog configuration.
-The `test.hive_test` catalog is the catalog created by you in Gravitino.
+The `hive_test` catalog is the catalog created by you in Gravitino.
Other catalogs are regular user-configured Trino catalogs.
### Creating tables and schemas
diff --git a/docs/trino-connector/catalog-iceberg.md
b/docs/trino-connector/catalog-iceberg.md
index 4a06267ca..62eac9f47 100644
--- a/docs/trino-connector/catalog-iceberg.md
+++ b/docs/trino-connector/catalog-iceberg.md
@@ -25,7 +25,7 @@ To use Iceberg, you need:
Users can create a schema through Apache Gravitino Trino connector as follows:
```SQL
-CREATE SCHEMA "metalake.catalog".schema_name
+CREATE SCHEMA catalog.schema_name
```
## Table operations
@@ -38,7 +38,7 @@ allowing null values, and adding comments. The Gravitino
Trino connector does no
The following example shows how to create a table in the Iceberg catalog:
```shell
-CREATE TABLE "metalake.catalog".schema_name.table_name
+CREATE TABLE catalog.schema_name.table_name
(
name varchar,
salary int
@@ -71,12 +71,11 @@ Iceberg schema does not support properties.
Users can use the following example to create a table with properties:
```sql
-CREATE TABLE "metalake.catalog".dbname.tablename
+CREATE TABLE catalog.dbname.tablename
(
name varchar,
salary int
) WITH (
- format = 'TEXTFILE',
KEY = 'VALUE',
...
);
@@ -147,7 +146,7 @@ Query 20231017_082503_00018_6nt3n, FINISHED, 1 node
```
The `gravitino` catalog is a catalog defined By Trino catalog configuration.
-The `test.iceberg_test` catalog is the catalog created by you in Gravitino.
+The `iceberg_test` catalog is the catalog created by you in Gravitino.
Other catalogs are regular user-configured Trino catalogs.
### Creating tables and schemas
@@ -158,7 +157,7 @@ Create a new schema named `database_01` in
`test.iceberg_test` catalog.
CREATE SCHEMA iceberg_test.database_01;
```
-Create a new table named `table_01` in schema
`"test.iceberg_test".database_01`.
+Create a new table named `table_01` in schema `iceberg_test.database_01`.
```sql
CREATE TABLE iceberg_test.database_01.table_01
@@ -182,7 +181,7 @@ INSERT INTO iceberg_test.database_01.table_01 (name,
salary) VALUES ('ice', 12);
Insert data into the table `table_01` from select:
```sql
-INSERT INTO iceberg_test.database_01.table_01 (name, salary) SELECT * FROM
"test.iceberg_test".database_01.table_01;
+INSERT INTO iceberg_test.database_01.table_01 (name, salary) SELECT * FROM
iceberg_test.database_01.table_01;
```
### Querying data
@@ -190,7 +189,7 @@ INSERT INTO iceberg_test.database_01.table_01 (name,
salary) SELECT * FROM "test
Query the `table_01` table:
```sql
-SELECT * FROM "test.iceberg_test".database_01.table_01;
+SELECT * FROM iceberg_test.database_01.table_01;
```
### Modify a table
@@ -198,19 +197,19 @@ SELECT * FROM "test.iceberg_test".database_01.table_01;
Add a new column `age` to the `table_01` table:
```sql
-ALTER TABLE "test.iceberg_test".database_01.table_01 ADD COLUMN age int;
+ALTER TABLE iceberg_test.database_01.table_01 ADD COLUMN age int;
```
Drop a column `age` from the `table_01` table:
```sql
-ALTER TABLE "test.iceberg_test".database_01.table_01 DROP COLUMN age;
+ALTER TABLE iceberg_test.database_01.table_01 DROP COLUMN age;
```
Rename the `table_01` table to `table_02`:
```sql
-ALTER TABLE "test.iceberg_test".database_01.table_01 RENAME TO
"test.iceberg_test".database_01.table_02;
+ALTER TABLE iceberg_test.database_01.table_01 RENAME TO
iceberg_test.database_01.table_02;
```
### Drop
@@ -218,13 +217,13 @@ ALTER TABLE "test.iceberg_test".database_01.table_01
RENAME TO "test.iceberg_tes
Drop a schema:
```sql
-DROP SCHEMA "test.iceberg_test".database_01;
+DROP SCHEMA iceberg_test.database_01;
```
Drop a table:
```sql
-DROP TABLE "test.iceberg_test".database_01.table_01;
+DROP TABLE iceberg_test.database_01.table_01;
```
## HDFS username and permissions
diff --git a/docs/trino-connector/catalog-mysql.md
b/docs/trino-connector/catalog-mysql.md
index 6cbd6ea43..131aabdbe 100644
--- a/docs/trino-connector/catalog-mysql.md
+++ b/docs/trino-connector/catalog-mysql.md
@@ -95,7 +95,7 @@ Query 20231017_082503_00018_6nt3n, FINISHED, 1 node
```
The `gravitino` catalog is a catalog defined By Trino catalog configuration.
-The `test.mysql_test` catalog is the catalog created by you in Gravitino.
+The `mysql_test` catalog is the catalog created by you in Gravitino.
Other catalogs are regular user-configured Trino catalogs.
### Creating tables and schemas
@@ -155,7 +155,7 @@ ALTER TABLE mysql_test.database_01.table_01 DROP COLUMN age;
Rename the `table_01` table to `table_02`:
```sql
-ALTER TABLE mysql_test.database_01.table_01 RENAME TO
"test.mysql_test".database_01.table_02;
+ALTER TABLE mysql_test.database_01.table_01 RENAME TO
mysql_test.database_01.table_02;
```
### DROP
diff --git a/docs/trino-connector/catalog-postgresql.md
b/docs/trino-connector/catalog-postgresql.md
index 9ce2876ff..83968f55f 100644
--- a/docs/trino-connector/catalog-postgresql.md
+++ b/docs/trino-connector/catalog-postgresql.md
@@ -95,7 +95,7 @@ Query 20231017_082503_00018_6nt3n, FINISHED, 1 node
```
The `gravitino` catalog is a catalog defined By Trino catalog configuration.
-The `test.postgresql_test` catalog is the catalog created by you in Gravitino.
+The `postgresql_test` catalog is the catalog created by you in Gravitino.
Other catalogs are regular user-configured Trino catalogs.
### Creating tables and schemas
@@ -106,7 +106,7 @@ Create a new schema named `database_01` in
`postgresql_test` catalog.
CREATE SCHEMA postgresql_test.database_01;
```
-Create a new table named `table_01` in schema
`"test.postgresql_test".database_01`.
+Create a new table named `table_01` in schema `postgresql_test.database_01`.
```sql
CREATE TABLE postgresql_test.database_01.table_01
@@ -127,7 +127,7 @@ INSERT INTO postgresql_test.database_01.table_01 (name,
salary) VALUES ('ice', 1
Insert data into the table `table_01` from select:
```sql
-INSERT INTO postgresql_test.database_01.table_01 (name, salary) SELECT * FROM
"test.postgresql_test".database_01.table_01;
+INSERT INTO postgresql_test.database_01.table_01 (name, salary) SELECT * FROM
postgresql_test.database_01.table_01;
```
### Querying data
@@ -155,7 +155,7 @@ ALTER TABLE postgresql_test.database_01.table_01 DROP
COLUMN age;
Rename the `table_01` table to `table_02`:
```sql
-ALTER TABLE postgresql_test.database_01.table_01 RENAME TO
"test.postgresql_test".database_01.table_02;
+ALTER TABLE postgresql_test.database_01.table_01 RENAME TO
postgresql_test.database_01.table_02;
```
### Drop
diff --git a/docs/trino-connector/development.md
b/docs/trino-connector/development.md
index 509a44a0f..6b1fb79ff 100644
--- a/docs/trino-connector/development.md
+++ b/docs/trino-connector/development.md
@@ -70,15 +70,53 @@ then you can see the `gravitino-trino-connecor` source
files and directories in
</properties>
<dependencies>
+
+ <!--
+ You can switch to the snapshot version as you like, for example,
+ if you want to use the jar of latest main branch,
+ you can execute the following command to install Gravitino
`client-java-runtime` jar locally.
+ ./gradlew publishToMavenLocal
+ -->
+ <dependency>
+ <groupId>org.apache.gravitino</groupId>
+ <artifactId>catalog-common</artifactId>
+ <version><GRAVITINO_VERSION></version>
+ <exclusions>
+ <exclusion>
+ <groupId>io.dropwizard.metrics</groupId>
+ <artifactId>metrics-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>io.netty</groupId>
+ <artifactId>netty</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.gravitino</groupId>
+ <artifactId>client-java-runtime</artifactId>
+ <version><GRAVITINO_VERSION></version>
+ </dependency>
+
<dependency>
<groupId>io.airlift</groupId>
<artifactId>json</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.airlift.resolver</groupId>
+ <artifactId>resolver</artifactId>
+ <version>1.6</version>
+ </dependency>
+
<dependency>
<groupId>io.trino</groupId>
- <artifactId>trino-spi</artifactId>
- <scope>provided</scope>
+ <artifactId>trino-client</artifactId>
</dependency>
<dependency>
@@ -87,8 +125,14 @@ then you can see the `gravitino-trino-connecor` source
files and directories in
</dependency>
<dependency>
- <groupId>io.trino</groupId>
- <artifactId>trino-client</artifactId>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-collections4</artifactId>
+ <version>4.4</version>
</dependency>
<dependency>
@@ -97,50 +141,51 @@ then you can see the `gravitino-trino-connecor` source
files and directories in
</dependency>
<dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- <scope>provided</scope>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-xml</artifactId>
+ <version>4.0.2</version>
</dependency>
<dependency>
- <groupId>io.trino</groupId>
- <artifactId>trino-jdbc</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>2.0.9</version>
</dependency>
<dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-collections4</artifactId>
- <version>4.4</version>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j2-impl</artifactId>
+ <version>2.22.0</version>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.7.32</version>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <version>2.22.0</version>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <version>2.0.9</version>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>2.22.0</version>
</dependency>
- <!--
- You can switch to the snapshot version as you like, for example,
- if you want to use the jar of latest main branch,
- you can execute the following command to install Gravitino
`client-java-runtime` jar locally.
- ./gradlew publishToMavenLocal
- -->
<dependency>
- <groupId>org.apache.gravitino</groupId>
- <artifactId>client-java-runtime</artifactId>
- <version>0.5.1</version>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.gravitino</groupId>
- <artifactId>bundled-catalog</artifactId>
- <version>0.5.1</version>
+ <groupId>io.opentelemetry</groupId>
+ <artifactId>opentelemetry-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>io.trino</groupId>
+ <artifactId>trino-spi</artifactId>
+ <scope>provided</scope>
</dependency>
</dependencies>