Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hudi feature #189

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,570 changes: 1,307 additions & 263 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,21 @@ default-run = "dft"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
arrow-flight = { version = "52.2.0", features = ["flight-sql-experimental"] , optional = true }
arrow-flight = { version = "53.0.0", features = ["flight-sql-experimental"] , optional = true }
async-trait = "0.1.80"
clap = { version = "4.5.1", features = ["derive"] }
color-eyre = "0.6.3"
crossterm = { version = "0.28.1", features = ["event-stream"] }
datafusion = "41.0.0"
datafusion-common = "41.0.0"
datafusion = "42.0.0"
datafusion-common = "42.0.0"
datafusion-functions-json = { version = "0.41.0", optional = true }
deltalake = { version = "0.19.0", features = ["datafusion"], optional = true }
directories = "5.0.1"
env_logger = "0.11.5"
futures = "0.3.30"
http = "0.2.9"
http-body = {version = "0.4.5" }
hudi = { features = ["datafusion"], optional = true, git = "https://github.com/apache/hudi-rs", rev = "abb3e635a28af229ba1e872fd6005c381e2b7ded" }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use https://crates.io/crates/hudi/0.2.0-rc.1 now, and soon use 0.2.0 once the release is out.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matthewmturner thanks for the work - any plan to move this forward?

Copy link
Collaborator Author

@matthewmturner matthewmturner Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! I'm really looking forward to getting this merged. Unfortunately, it was held back back because we already have a deltalake feature but they werent able to upgrade datafusion for an extended period of time which prevented this from moving forward. It seems to finally be resolved and I hope to get this merged shortly.

Some other context:

  1. I dont plan on releasing next version until this and iceberg are added as features (those are basically the only blockers at this point)
  2. Because of how unfortunate this was i am considering a switch to the new FFI interface. The community has expressed interest in this as well, but i wouldnt expect that to come until after a release

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's good to know. thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xushiyan do you think apache/hudi-rs#196 could be included in the 0.2.0 release?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matthewmturner 0.2.0 was already in voting stage. we can get this in 0.3.0 which shouldn't be too far away

itertools = "0.13.0"
lazy_static = "1.4.0"
log = "0.4.22"
Expand All @@ -53,10 +54,12 @@ assert_cmd = "2.0.16"
insta = { version = "1.40.0", features = ["yaml"] }
predicates = "3.1.2"
tempfile = "3.2.0"
url = "2.5.2"

# When addding a new feature, also add it to the features tested list in CI (`.github/workflows/rust.yml`)
[features]
deltalake = ["dep:deltalake"]
hudi = ["dep:hudi"]
flightsql = ["dep:arrow-flight", "dep:tonic"]
experimental-flightsql-server = ["dep:arrow-flight", "dep:tonic"]
s3 = ["object_store/aws", "url"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"partitionToWriteStats" : {
"20" : [ {
"fileId" : "76e0556b-390d-4249-b7ad-9059e2bc2cbd-0",
"path" : "20/76e0556b-390d-4249-b7ad-9059e2bc2cbd-0_0-98-141_20240418172802262.parquet",
"cdcStats" : null,
"prevCommit" : "null",
"numWrites" : 1,
"numDeletes" : 0,
"numUpdateWrites" : 0,
"numInserts" : 1,
"totalWriteBytes" : 441161,
"totalWriteErrors" : 0,
"tempPath" : null,
"partitionPath" : "20",
"totalLogRecords" : 0,
"totalLogFilesCompacted" : 0,
"totalLogSizeCompacted" : 0,
"totalUpdatedRecordsCompacted" : 0,
"totalLogBlocks" : 0,
"totalCorruptLogBlock" : 0,
"totalRollbackBlocks" : 0,
"fileSizeInBytes" : 441161,
"minEventTime" : null,
"maxEventTime" : null,
"runtimeStats" : {
"totalScanTime" : 0,
"totalUpsertTime" : 0,
"totalCreateTime" : 107
}
} ],
"10" : [ {
"fileId" : "97de74b1-2a8e-4bb7-874c-0a74e1f42a77-0",
"path" : "10/97de74b1-2a8e-4bb7-874c-0a74e1f42a77-0_1-98-142_20240418172802262.parquet",
"cdcStats" : null,
"prevCommit" : "null",
"numWrites" : 2,
"numDeletes" : 0,
"numUpdateWrites" : 0,
"numInserts" : 2,
"totalWriteBytes" : 441426,
"totalWriteErrors" : 0,
"tempPath" : null,
"partitionPath" : "10",
"totalLogRecords" : 0,
"totalLogFilesCompacted" : 0,
"totalLogSizeCompacted" : 0,
"totalUpdatedRecordsCompacted" : 0,
"totalLogBlocks" : 0,
"totalCorruptLogBlock" : 0,
"totalRollbackBlocks" : 0,
"fileSizeInBytes" : 441426,
"minEventTime" : null,
"maxEventTime" : null,
"runtimeStats" : {
"totalScanTime" : 0,
"totalUpsertTime" : 0,
"totalCreateTime" : 107
}
} ]
},
"compacted" : false,
"extraMetadata" : {
"schema" : "{\"type\":\"record\",\"name\":\"v6_simplekeygen_nonhivestyle_record\",\"namespace\":\"hoodie.v6_simplekeygen_nonhivestyle\",\"fields\":[{\"name\":\"id\",\"type\":[\"null\",\"int\"],\"default\":null},{\"name\":\"name\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"isActive\",\"type\":[\"null\",\"boolean\"],\"default\":null},{\"name\":\"shortField\",\"type\":[\"null\",\"int\"],\"default\":null},{\"name\":\"intField\",\"type\":[\"null\",\"int\"],\"default\":null},{\"name\":\"longField\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"floatField\",\"type\":[\"null\",\"float\"],\"default\":null},{\"name\":\"doubleField\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"decimalField\",\"type\":[\"null\",{\"type\":\"fixed\",\"name\":\"fixed\",\"namespace\":\"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record.decimalField\",\"size\":5,\"logicalType\":\"decimal\",\"precision\":10,\"scale\":5}],\"default\":null},{\"name\":\"dateField\",\"type\":[\"null\",{\"type\":\"int\",\"logicalType\":\"date\"}],\"default\":null},{\"name\":\"timestampField\",\"type\":[\"null\",{\"type\":\"long\",\"logicalType\":\"timestamp-micros\"}],\"default\":null},{\"name\":\"binaryField\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"arrayField\",\"type\":[\"null\",{\"type\":\"array\",\"items\":[\"null\",{\"type\":\"record\",\"name\":\"arrayField\",\"namespace\":\"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record\",\"fields\":[{\"name\":\"arr_struct_f1\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"arr_struct_f2\",\"type\":[\"null\",\"int\"],\"default\":null}]}]}],\"default\":null},{\"name\":\"mapField\",\"type\":[\"null\",{\"type\":\"map\",\"values\":[\"null\",{\"type\":\"record\",\"name\":\"mapField\",\"namespace\":\"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record\",\"fields\":[{\"name\":\"map_field_value_struct_f1\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"map_field_value_struct_f2\",\"type\":[\"null\",\"boolean\"],\"default\":null}]}]}],\"default\":null},{\"name\":\"structField\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"structField\",\"namespace\":\"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record\",\"fields\":[{\"name\":\"field1\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"field2\",\"type\":[\"null\",\"int\"],\"default\":null},{\"name\":\"child_struct\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"child_struct\",\"namespace\":\"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record.structField\",\"fields\":[{\"name\":\"child_field1\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"child_field2\",\"type\":[\"null\",\"boolean\"],\"default\":null}]}],\"default\":null}]}],\"default\":null},{\"name\":\"byteField\",\"type\":[\"null\",\"int\"],\"default\":null}]}"
},
"operationType" : "UPSERT"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"partitionToWriteStats" : {
"20" : [ {
"fileId" : "",
"path" : null,
"cdcStats" : null,
"prevCommit" : "null",
"numWrites" : 0,
"numDeletes" : 0,
"numUpdateWrites" : 0,
"numInserts" : 1,
"totalWriteBytes" : 0,
"totalWriteErrors" : 0,
"tempPath" : null,
"partitionPath" : null,
"totalLogRecords" : 0,
"totalLogFilesCompacted" : 0,
"totalLogSizeCompacted" : 0,
"totalUpdatedRecordsCompacted" : 0,
"totalLogBlocks" : 0,
"totalCorruptLogBlock" : 0,
"totalRollbackBlocks" : 0,
"fileSizeInBytes" : 0,
"minEventTime" : null,
"maxEventTime" : null,
"runtimeStats" : null
} ],
"10" : [ {
"fileId" : "",
"path" : null,
"cdcStats" : null,
"prevCommit" : "null",
"numWrites" : 0,
"numDeletes" : 0,
"numUpdateWrites" : 0,
"numInserts" : 2,
"totalWriteBytes" : 0,
"totalWriteErrors" : 0,
"tempPath" : null,
"partitionPath" : null,
"totalLogRecords" : 0,
"totalLogFilesCompacted" : 0,
"totalLogSizeCompacted" : 0,
"totalUpdatedRecordsCompacted" : 0,
"totalLogBlocks" : 0,
"totalCorruptLogBlock" : 0,
"totalRollbackBlocks" : 0,
"fileSizeInBytes" : 0,
"minEventTime" : null,
"maxEventTime" : null,
"runtimeStats" : null
} ]
},
"compacted" : false,
"extraMetadata" : { },
"operationType" : "UPSERT"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"partitionToWriteStats" : {
"30" : [ {
"fileId" : "6db57019-98ee-480e-8eb1-fb3de48e1c24-0",
"path" : "30/6db57019-98ee-480e-8eb1-fb3de48e1c24-0_1-119-167_20240418172804498.parquet",
"cdcStats" : null,
"prevCommit" : "null",
"numWrites" : 1,
"numDeletes" : 0,
"numUpdateWrites" : 0,
"numInserts" : 1,
"totalWriteBytes" : 441186,
"totalWriteErrors" : 0,
"tempPath" : null,
"partitionPath" : "30",
"totalLogRecords" : 0,
"totalLogFilesCompacted" : 0,
"totalLogSizeCompacted" : 0,
"totalUpdatedRecordsCompacted" : 0,
"totalLogBlocks" : 0,
"totalCorruptLogBlock" : 0,
"totalRollbackBlocks" : 0,
"fileSizeInBytes" : 441186,
"minEventTime" : null,
"maxEventTime" : null,
"runtimeStats" : {
"totalScanTime" : 0,
"totalUpsertTime" : 0,
"totalCreateTime" : 90
}
} ],
"10" : [ {
"fileId" : "97de74b1-2a8e-4bb7-874c-0a74e1f42a77-0",
"path" : "10/97de74b1-2a8e-4bb7-874c-0a74e1f42a77-0_0-119-166_20240418172804498.parquet",
"cdcStats" : null,
"prevCommit" : "20240418172802262",
"numWrites" : 2,
"numDeletes" : 0,
"numUpdateWrites" : 1,
"numInserts" : 0,
"totalWriteBytes" : 441352,
"totalWriteErrors" : 0,
"tempPath" : null,
"partitionPath" : "10",
"totalLogRecords" : 0,
"totalLogFilesCompacted" : 0,
"totalLogSizeCompacted" : 0,
"totalUpdatedRecordsCompacted" : 0,
"totalLogBlocks" : 0,
"totalCorruptLogBlock" : 0,
"totalRollbackBlocks" : 0,
"fileSizeInBytes" : 441352,
"minEventTime" : null,
"maxEventTime" : null,
"runtimeStats" : {
"totalScanTime" : 0,
"totalUpsertTime" : 103,
"totalCreateTime" : 0
}
} ]
},
"compacted" : false,
"extraMetadata" : {
"schema" : "{\"type\":\"record\",\"name\":\"v6_simplekeygen_nonhivestyle_record\",\"namespace\":\"hoodie.v6_simplekeygen_nonhivestyle\",\"fields\":[{\"name\":\"id\",\"type\":[\"null\",\"int\"],\"default\":null},{\"name\":\"name\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"isActive\",\"type\":[\"null\",\"boolean\"],\"default\":null},{\"name\":\"shortField\",\"type\":[\"null\",\"int\"],\"default\":null},{\"name\":\"intField\",\"type\":[\"null\",\"int\"],\"default\":null},{\"name\":\"longField\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"floatField\",\"type\":[\"null\",\"float\"],\"default\":null},{\"name\":\"doubleField\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"decimalField\",\"type\":[\"null\",{\"type\":\"fixed\",\"name\":\"fixed\",\"namespace\":\"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record.decimalField\",\"size\":5,\"logicalType\":\"decimal\",\"precision\":10,\"scale\":5}],\"default\":null},{\"name\":\"dateField\",\"type\":[\"null\",{\"type\":\"int\",\"logicalType\":\"date\"}],\"default\":null},{\"name\":\"timestampField\",\"type\":[\"null\",{\"type\":\"long\",\"logicalType\":\"timestamp-micros\"}],\"default\":null},{\"name\":\"binaryField\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"arrayField\",\"type\":[\"null\",{\"type\":\"array\",\"items\":[\"null\",{\"type\":\"record\",\"name\":\"arrayField\",\"namespace\":\"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record\",\"fields\":[{\"name\":\"arr_struct_f1\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"arr_struct_f2\",\"type\":[\"null\",\"int\"],\"default\":null}]}]}],\"default\":null},{\"name\":\"mapField\",\"type\":[\"null\",{\"type\":\"map\",\"values\":[\"null\",{\"type\":\"record\",\"name\":\"mapField\",\"namespace\":\"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record\",\"fields\":[{\"name\":\"map_field_value_struct_f1\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"map_field_value_struct_f2\",\"type\":[\"null\",\"boolean\"],\"default\":null}]}]}],\"default\":null},{\"name\":\"structField\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"structField\",\"namespace\":\"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record\",\"fields\":[{\"name\":\"field1\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"field2\",\"type\":[\"null\",\"int\"],\"default\":null},{\"name\":\"child_struct\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"child_struct\",\"namespace\":\"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record.structField\",\"fields\":[{\"name\":\"child_field1\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"child_field2\",\"type\":[\"null\",\"boolean\"],\"default\":null}]}],\"default\":null}]}],\"default\":null},{\"name\":\"byteField\",\"type\":[\"null\",\"int\"],\"default\":null}]}"
},
"operationType" : "UPSERT"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"partitionToWriteStats" : {
"30" : [ {
"fileId" : "",
"path" : null,
"cdcStats" : null,
"prevCommit" : "null",
"numWrites" : 0,
"numDeletes" : 0,
"numUpdateWrites" : 0,
"numInserts" : 1,
"totalWriteBytes" : 0,
"totalWriteErrors" : 0,
"tempPath" : null,
"partitionPath" : null,
"totalLogRecords" : 0,
"totalLogFilesCompacted" : 0,
"totalLogSizeCompacted" : 0,
"totalUpdatedRecordsCompacted" : 0,
"totalLogBlocks" : 0,
"totalCorruptLogBlock" : 0,
"totalRollbackBlocks" : 0,
"fileSizeInBytes" : 0,
"minEventTime" : null,
"maxEventTime" : null,
"runtimeStats" : null
} ],
"10" : [ {
"fileId" : "",
"path" : null,
"cdcStats" : null,
"prevCommit" : "null",
"numWrites" : 0,
"numDeletes" : 0,
"numUpdateWrites" : 0,
"numInserts" : 0,
"totalWriteBytes" : 0,
"totalWriteErrors" : 0,
"tempPath" : null,
"partitionPath" : null,
"totalLogRecords" : 0,
"totalLogFilesCompacted" : 0,
"totalLogSizeCompacted" : 0,
"totalUpdatedRecordsCompacted" : 0,
"totalLogBlocks" : 0,
"totalCorruptLogBlock" : 0,
"totalRollbackBlocks" : 0,
"fileSizeInBytes" : 0,
"minEventTime" : null,
"maxEventTime" : null,
"runtimeStats" : null
}, {
"fileId" : "97de74b1-2a8e-4bb7-874c-0a74e1f42a77-0",
"path" : null,
"cdcStats" : null,
"prevCommit" : "20240418172802262",
"numWrites" : 0,
"numDeletes" : 0,
"numUpdateWrites" : 1,
"numInserts" : 0,
"totalWriteBytes" : 0,
"totalWriteErrors" : 0,
"tempPath" : null,
"partitionPath" : null,
"totalLogRecords" : 0,
"totalLogFilesCompacted" : 0,
"totalLogSizeCompacted" : 0,
"totalUpdatedRecordsCompacted" : 0,
"totalLogBlocks" : 0,
"totalCorruptLogBlock" : 0,
"totalRollbackBlocks" : 0,
"fileSizeInBytes" : 0,
"minEventTime" : null,
"maxEventTime" : null,
"runtimeStats" : null
} ]
},
"compacted" : false,
"extraMetadata" : { },
"operationType" : "UPSERT"
}
17 changes: 17 additions & 0 deletions data/hudi/v6_simplekeygen_nonhivestyle/.hoodie/hoodie.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#Properties saved on 2024-04-18T22:27:38.493Z
#Thu Apr 18 17:27:38 CDT 2024
hoodie.table.precombine.field=longField
hoodie.datasource.write.drop.partition.columns=false
hoodie.table.partition.fields=byteField
hoodie.table.type=COPY_ON_WRITE
hoodie.archivelog.folder=archived
hoodie.timeline.layout.version=1
hoodie.table.version=6
hoodie.table.recordkey.fields=id
hoodie.database.name=default
hoodie.datasource.write.partitionpath.urlencode=false
hoodie.table.name=v6_simplekeygen_nonhivestyle
hoodie.table.keygenerator.class=org.apache.hudi.keygen.SimpleKeyGenerator
hoodie.datasource.write.hive_style_partitioning=false
hoodie.table.create.schema={"type"\:"record","name"\:"v6_simplekeygen_nonhivestyle_record","namespace"\:"hoodie.v6_simplekeygen_nonhivestyle","fields"\:[{"name"\:"id","type"\:["int","null"]},{"name"\:"name","type"\:["string","null"]},{"name"\:"isActive","type"\:["boolean","null"]},{"name"\:"shortField","type"\:["int","null"]},{"name"\:"intField","type"\:["int","null"]},{"name"\:"longField","type"\:["long","null"]},{"name"\:"floatField","type"\:["float","null"]},{"name"\:"doubleField","type"\:["double","null"]},{"name"\:"decimalField","type"\:[{"type"\:"fixed","name"\:"fixed","namespace"\:"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record.decimalField","size"\:5,"logicalType"\:"decimal","precision"\:10,"scale"\:5},"null"]},{"name"\:"dateField","type"\:[{"type"\:"int","logicalType"\:"date"},"null"]},{"name"\:"timestampField","type"\:[{"type"\:"long","logicalType"\:"timestamp-micros"},"null"]},{"name"\:"binaryField","type"\:["bytes","null"]},{"name"\:"arrayField","type"\:[{"type"\:"array","items"\:[{"type"\:"record","name"\:"arrayField","namespace"\:"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record","fields"\:[{"name"\:"arr_struct_f1","type"\:["string","null"]},{"name"\:"arr_struct_f2","type"\:["int","null"]}]},"null"]},"null"]},{"name"\:"mapField","type"\:[{"type"\:"map","values"\:[{"type"\:"record","name"\:"mapField","namespace"\:"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record","fields"\:[{"name"\:"map_field_value_struct_f1","type"\:["double","null"]},{"name"\:"map_field_value_struct_f2","type"\:["boolean","null"]}]},"null"]},"null"]},{"name"\:"structField","type"\:[{"type"\:"record","name"\:"structField","namespace"\:"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record","fields"\:[{"name"\:"field1","type"\:["string","null"]},{"name"\:"field2","type"\:["int","null"]},{"name"\:"child_struct","type"\:[{"type"\:"record","name"\:"child_struct","namespace"\:"hoodie.v6_simplekeygen_nonhivestyle.v6_simplekeygen_nonhivestyle_record.structField","fields"\:[{"name"\:"child_field1","type"\:["double","null"]},{"name"\:"child_field2","type"\:["boolean","null"]}]},"null"]}]},"null"]},{"name"\:"byteField","type"\:["int","null"]}]}
hoodie.table.checksum=616688896
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#partition metadata
#Thu Apr 18 17:28:02 CDT 2024
commitTime=20240418172802262
partitionDepth=1
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#partition metadata
#Thu Apr 18 17:28:02 CDT 2024
commitTime=20240418172802262
partitionDepth=1
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#partition metadata
#Thu Apr 18 17:28:04 CDT 2024
commitTime=20240418172804498
partitionDepth=1
Binary file not shown.
42 changes: 42 additions & 0 deletions src/extensions/hudi.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

//! DeltaLake integration: [DeltaLakeExtension]

use crate::config::ExecutionConfig;
use crate::extensions::{DftSessionStateBuilder, Extension};
use hudi::HudiTableFactory;
use std::sync::Arc;

#[derive(Debug, Default)]
pub struct HudiExtension {}

impl HudiExtension {
pub fn new() -> Self {
Self {}
}
}

impl Extension for HudiExtension {
fn register(
&self,
_config: &ExecutionConfig,
builder: DftSessionStateBuilder,
) -> datafusion_common::Result<DftSessionStateBuilder> {
Ok(builder.with_table_factory("HUDI", Arc::new(HudiTableFactory {})))
}
}
Loading
Loading