Kudu Catalog is compatible with the Trino Connector framework, using the Kudu Connector to access Kudu tables.

This feature is supported starting from Doris version 3.0.1.

Kudu Catalog - 图1Note

This is an experimental feature.

Instructions for Use

  1. Before accessing Kudu tables using the Trino Catalog, you must first compile the Trino Kudu plugin and place it in the specified directory. Refer to the following steps for detailed 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. Due to the Trino 435 version Kudu plugin not supporting the DATE type, it is recommended to use the Kudu plugin we provide.

Compiling the Kudu 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-kudu
  5. $ mvn clean package -Dmaven.test.skip=true

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

You can also directly download our precompiled trino-kudu-435-20240724.tar.gz and extract it.

Deploying the Kudu Connector

Place the trino-kudu-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-kudu-435
  5. ...

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

Creating the Kudu Catalog

  1. create catalog kudu_catalog properties (
  2. "type"="trino-connector",
  3. "trino.connector.name"="kudu",
  4. "trino.kudu.client.master-addresses"="ip1:port1,ip2:port2,ip3,port3",
  5. "trino.kudu.authentication.type" = "NONE"
  6. );

Note: Properties prefixed with trino. are native Trino properties. For more information on Kudu properties, refer to the Trino documentation.

Column Type Mapping

KuduTrinoDorisDescription
BOOLEANBOOLEANBOOLEAN
INT8TINYINTTINYINT
INT16SMALLINTSMALLINT
INT32INTEGERINT
INT64BIGINTBIGINT
FLOATREALFLOAT
DOUBLEDOUBLEDOUBLE
BINARYVARBINARYSTRINGNeeds HEX(col) to display the same as Trino
STRINGVARCHARSTRING
DECIMAL(p,s)DECIMAL(p,s)DECIMAL(p,s)
DATEDATEDATE
UNIXTIME_MICROSTIMESTAMP(3)DATETIME(3)
VARCHARUNSUPPORTED
UTF-8 encoded stringUNSUPPORTED