Doris

This documentation is a guide for using Paimon in Doris.

More details can be found in Apache Doris Website

Version

Paimon currently supports Apache Doris 2.0.6 and above.

Create Paimon Catalog

Use CREATE CATALOG statement in Apache Doris to create Paimon Catalog.

Doris support multi types of Paimon Catalogs. Here are some examples:


1. -- HDFS based Paimon Catalog
2. CREATE CATALOG `paimon_hdfs` PROPERTIES (
3. "type" = "paimon",
4. "warehouse" = "hdfs://172.21.0.1:8020/user/paimon",
5. "hadoop.username" = "hadoop"
6. );

8. -- Aliyun OSS based Paimon Catalog
9. CREATE CATALOG `paimon_oss` PROPERTIES (
10. "type" = "paimon",
11. "warehouse" = "oss://paimon-bucket/paimonoss",
12. "oss.endpoint" = "oss-cn-beijing.aliyuncs.com",
13. "oss.access_key" = "ak",
14. "oss.secret_key" = "sk"
15. );

17. -- Hive Metastore based Paimon Catalog
18. CREATE CATALOG `paimon_hms` PROPERTIES (
19. "type" = "paimon",
20. "paimon.catalog.type" = "hms",
21. "warehouse" = "hdfs://172.21.0.1:8020/user/zhangdong/paimon2",
22. "hive.metastore.uris" = "thrift://172.21.0.44:7004",
23. "hadoop.username" = "hadoop"
24. );

See Apache Doris Website for more examples.

Access Paimon Catalog

  1. Query Paimon table with full qualified name

```

  1. SELECT * FROM paimon_hdfs.paimon_db.paimon_table; ```
  2. Switch to Paimon Catalog and query

```

  1. SWITCH paimon_hdfs;
  2. USE paimon_db;
  3. SELECT * FROM paimon_table; ```

Query Optimization

  • Read optimized for Primary Key Table

Doris can utilize the Read optimized feature for Primary Key Table(release in Paimon 0.6), by reading base data files using native Parquet/ORC reader and delta file using JNI. - Deletion Vectors

Doris(2.1.4+) natively supports Deletion Vectors(released in Paimon 0.8).

Doris to Paimon type mapping

Doris Data Type Paimon Data Type Atomic Type
Boolean BooleanType true
TinyInt TinyIntType true
SmallInt SmallIntType true
Int IntType true
BigInt BigIntType true
Float FloatType true
Double DoubleType true
Varchar VarCharType true
Char CharType true
Binary VarBinaryType, BinaryType true
Decimal(precision, scale) DecimalType(precision, scale) true
Datetime TimestampType,LocalZonedTimestampType true
Date DateType true
Array ArrayType false
Map MapType false
Struct RowType false