Delta Lake Catalog is compatible with the Trino Connector, using the Delta Lake Connector to access Delta Lake tables.

This feature is supported starting from Doris version 3.0.1.

Delta Lake Catalog - 图1Note

This is an experimental feature.

Instructions for Use

  1. Before accessing Delta Lake tables with the Trino Catalog, you must first compile the Trino Delta Lake plugin and place it in the specified directory. Refer to the following steps for specific instructions.
  2. The current Doris is compatible with the Trino 435 version plugin. Using a Trino plugin lower or higher than version 435 may cause compatibility issues.
  3. Time Travel feature of Delta Lake is not supported at the moment.
  4. Querying Delta Lake history information is not supported at the moment.

Compiling the Delta Lake Connector Plugin

JDK version 17 is required.

  1. $ git clone https://github.com/apache/Doris-thirdparty.git
  2. $ cd Doris-thirdparty
  3. $ git checkout trino-435
  4. $ cd plugin/trino-delta-lake
  5. $ mvn clean install -DskipTest

After compiling, you will find the trino-delta-lake-435 directory under trino/plugin/trino-delta-lake/target/.

You can also directly download the precompiled trino-delta-lake-435-20240724.tar.gz and extract it.

Deploying the Delta Lake Connector

Place the trino-delta-lake-435/ directory in the connectors/ directory of all FE and BE deployment paths. (If it does not exist, you can create it manually).

  1. ├── bin
  2. ├── conf
  3. ├── connectors
  4. ├── trino-delta-lake-435
  5. ...

After deployment, it is recommended to restart the FE and BE nodes to ensure the Connector is correctly loaded.

Creating the Delta Lake Catalog

  1. create catalog delta_lake_catalog properties (
  2. "type"="trino-connector",
  3. "trino.connector.name"="delta_lake",
  4. "trino.hive.metastore"="thrift",
  5. "trino.hive.metastore.uri"= "thrift://ip:portrait ",
  6. "trino.hive.config.resources"="/path/to/core-site.xml,/path/to/hdfs-site.xml"
  7. );

Note: Properties prefixed with trino. are native Trino properties. For more information about Delta Lake properties, refer to the Trino documentation.

Column Type Mapping

Delta LakeTrinoDoris
BOOLEANBOOLEANBOOLEAN
INTEGERINTEGERINT
BYTETINYINTTINYINT
SHORTSMALLINTSMALLINT
LONGBIGINTBIGINT
FLOATREALFLOAT
DOUBLEDOUBLEDOUBLE
DECIMAL(p,s)DECIMAL(p,s)DECIMAL(p,s)
STRINGVARCHARSTRING
BINARYVARBINARYSTRING
DATEDATEDATE
TIMESTAMPNTZ (TIMESTAMP_NTZ)TIMESTAMP(6)DATETIME
TIMESTAMPTIMESTAMP(3) WITH TIME ZONEDATETIME
ARRAYARRAYARRAY
MAPMAPMAP
STRUCTROWSTRUCT