apache / hudi-rs

A native Rust library for Apache Hudi, with bindings into Python
https://hudi.apache.org/
Apache License 2.0
142 stars 28 forks source link

Support create hudi table. #125

Open gohalo opened 1 month ago

gohalo commented 1 month ago

Just like the java client routies.

HoodieTableMetaClient.withPropertyBuilder()
        .setTableType(HoodieTableType.MERGE_ON_READ)
        .setTableName(tableName)
        .setTableCreateSchema(SCHEMA)
        .setPayloadClassName(HoodieAvroPayload.class.getName())
        .initTable(conf, tablePath);

Currently, got some problems.

  1. object_store crate doesn't support to create directory. Because of the struct Path which without leading or trailing delimiters.
pub struct Path {
    /// The raw path with no leading or trailing delimiters
    raw: String,
}

But in most of cloud object store including minio, you could put empty to some path like /data/example/.hoodies/. Maybe we could change the value of private raw in the struct Path with unsafe codes, or, create some marker files like .hoodies/.schema/marker.

  1. We should create compatiable config files for Java properties, especilly for hoodies.properties.