Doris
This documentation is for an unreleased version of Apache Paimon. We recommend you use the latest stable version.

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:

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

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

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

See Apache Doris Website for more examples.

Access Paimon Catalog #

  1. Query Paimon table with full qualified name

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

    SWITCH paimon_hdfs;
    USE paimon_db;
    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
Edit This Page
Copyright © 2024 The Apache Software Foundation. Apache Paimon, Paimon, and its feather logo are trademarks of The Apache Software Foundation.