-
Notifications
You must be signed in to change notification settings - Fork 753
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
feat: add aws glue as an iceberg connection type #16824
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A change to the proto requires a new version to be added in this following file. And corresponding tests should be added. Please refer to the following instruction and existing test case file such as https://github.com/datafuselabs/databend/blob/2b6431c3e39b25a41011172718ba471df7f77800/src/meta/proto-conv/tests/it/v110_database_meta_gc_in_progress.rs
(110, "2024-09-18: Add: database.proto: DatabaseMeta.gc\_in\_progress"),
// Dear developer:
// If you're gonna add a new metadata version, you'll have to add a test for it.
// You could just copy an existing test file(e.g., \`../tests/it/v024\_table\_meta.rs\`)
// and replace two of the variable \`bytes\` and \`want\`.
@Xuanwo Could you please help review this new catalog option, about the usage and testing?
Reviewed 10 of 13 files at r1, all commit messages.
Reviewable status: 10 of 13 files reviewed, all discussions resolved
For the check CI failed, we should keep the Cargo.toml crate is in order, the fix is( diff --git a/Cargo.toml b/Cargo.toml
index 71b5ec05d2..e82e52ac7e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -308,9 +308,9 @@ humantime = "2.1.0"
hyper = "1"
hyper-util = { version = "0.1.9", features = ["client", "client-legacy", "tokio", "service"] }
iceberg = { version = "0.3.0", git = "https://github.com/Xuanwo/iceberg-rust/", rev = "fe5df3f" }
+iceberg-catalog-glue = { version = "0.3.0", git = "https://github.com/Xuanwo/iceberg-rust/", rev = "fe5df3f" }
iceberg-catalog-hms = { version = "0.3.0", git = "https://github.com/Xuanwo/iceberg-rust/", rev = "fe5df3f" }
iceberg-catalog-rest = { version = "0.3.0", git = "https://github.com/Xuanwo/iceberg-rust/", rev = "fe5df3f" }
-iceberg-catalog-glue = { version = "0.3.0", git = "https://github.com/Xuanwo/iceberg-rust/", rev = "fe5df3f" }
indexmap = "2.0.0"
indicatif = "0.17.5"
itertools = "0.13.0"
diff --git a/src/query/storages/iceberg/Cargo.toml b/src/query/storages/iceberg/Cargo.toml
index fc336ee6a0..add1c755fa 100644
--- a/src/query/storages/iceberg/Cargo.toml
+++ b/src/query/storages/iceberg/Cargo.toml
@@ -25,9 +25,9 @@ databend-storages-common-table-meta = { workspace = true }
fastrace = { workspace = true }
futures = { workspace = true }
iceberg = { workspace = true }
+iceberg-catalog-glue = { workspace = true }
iceberg-catalog-hms = { workspace = true }
iceberg-catalog-rest = { workspace = true }
-iceberg-catalog-glue = { workspace = true }
match-template = { workspace = true }
ordered-float = { workspace = true }
serde = { workspace = true } |
Hi, @Rowlandev, thank you so much for creating this—it's greatly appreciated! Most of the changes look good to me. The only missing part is integrating with our proto tests to ensure compatibility with our meta services.
databend/src/meta/proto-conv/src/util.rs Lines 142 to 147 in 7abfa96
You can refer to databend/src/meta/proto-conv/tests/it/v098_catalog_option.rs Lines 34 to 59 in 7abfa96
But changed with glue catalog. |
@Xuanwo, @BohuTANG & @drmingdrmer - thanks for the help! Let me know what else I can do to fix up this pull request. |
Thank you. Most to this PR looks good enough to me. As I mentioned in a previous comment, A new version and a corresponding test case should be added: In this comment: #16824 (review) |
@drmingdrmer My apologies, using git on this repo with two different machines, thought I pushed up. |
Does not matter :D I'll receive a notification once there is a new push. |
Is it party time? @drmingdrmer |
Not quite yet - still have some work to wrap up, though I'm flexible with the schedule:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 13 files at r1, 3 of 3 files at r2, 2 of 2 files at r3, 2 of 2 files at r4, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Rowlandev and @Xuanwo)
src/meta/proto-conv/tests/it/v111_add_glue_as_iceberg_catalog_option.rs
line 52 at r4 (raw file):
drop_on: None, gc_in_progress: true, };
This test should build an instance of IcebergCatalogOption` containing the new type to ensure it can be encoded and decoded correctly.
Code quote:
let want = || mt::DatabaseMeta {
engine: "44".to_string(),
engine_options: btreemap! {s("abc") => s("def")},
options: btreemap! {s("xyz") => s("foo")},
created_on: Utc.with_ymd_and_hms(2014, 11, 28, 12, 0, 9).unwrap(),
updated_on: Utc.with_ymd_and_hms(2014, 11, 29, 12, 0, 9).unwrap(),
comment: "foo bar".to_string(),
drop_on: None,
gc_in_progress: true,
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, with one minor issue noted below:
Reviewed all commit messages.
Reviewable status: 14 of 15 files reviewed, 2 unresolved discussions (waiting on @Rowlandev and @Xuanwo)
src/meta/proto-conv/tests/it/v111_add_glue_as_iceberg_catalog_option.rs
line 49 at r5 (raw file):
address: "http://127.0.0.1:9900".to_string(), warehouse: "s3://my_bucket".to_string(), props: Default::default(),
Add several sample values to props
to ensure it is actually encoded and decoded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you!
Reviewed 1 of 1 files at r6, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Rowlandev and @Xuanwo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Rowlandev and @Xuanwo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 9 of 13 files at r1, 2 of 3 files at r2, 2 of 2 files at r3, 1 of 2 files at r4, 1 of 1 files at r6, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Xuanwo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Xuanwo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r7, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Xuanwo)
It looks like the source code is not well formatted, which caused the check fails: You can run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r8, 1 of 1 files at r9, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Xuanwo)
fb9dc4b
to
977a93b
Compare
Nice job! Thank you! Let's merge! |
@soyeric128 Please update the documentation. Thanks. |
Hi, @Rowlandev, thank you so much for creating this. Could you provide a real example of creating a Glue catalog (with the secrets redacted)? |
@Xuanwo Yes sir. This relies on environment variables being set in the contained environment:
|
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Tests
Type of change
This change is