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

feat: Define schema post order visitor. #25

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

liurenjie1024
Copy link
Contributor

More tests are following.

@liurenjie1024 liurenjie1024 requested review from JanKaul, Xuanwo, Fokko and nastra and removed request for JanKaul and Xuanwo August 7, 2023 10:12
@liurenjie1024
Copy link
Contributor Author

I'm working on more tests.

@liurenjie1024
Copy link
Contributor Author

This pr is ready for review, PTAL. cc @Xuanwo @JanKaul @nastra @Fokko

crates/iceberg/src/error.rs Outdated Show resolved Hide resolved
crates/iceberg/src/error.rs Outdated Show resolved Hide resolved
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Some small comments, but looks great! Thanks @liurenjie1024 for working on this

@@ -28,12 +28,14 @@ keywords = ["iceberg"]

[dependencies]
apache-avro = "0.15.0"
serde = "^1.0"
serde = {version = "^1.0", features = ["rc"]}
Copy link
Contributor

Choose a reason for hiding this comment

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

I also like to live dangerous :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I don't get your point here 😂

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I'm sorry. It looks like you're pulling in Release Candidates?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I see. feature flag in rust is a tool to enable condition compilation, and 'rc' here means generating see/de code for 'Arc', and the explanation is here: https://stackoverflow.com/questions/49312600/how-do-i-serialize-or-deserialize-an-arct-in-serde.
I don't know similar concepts in java/python.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I didn't know that. Thanks!

crates/iceberg/src/spec/datatypes.rs Show resolved Hide resolved
crates/iceberg/src/spec/schema.rs Outdated Show resolved Hide resolved
crates/iceberg/src/spec/schema.rs Outdated Show resolved Hide resolved
crates/iceberg/src/spec/schema.rs Outdated Show resolved Hide resolved
crates/iceberg/src/spec/schema.rs Outdated Show resolved Hide resolved
}
}

impl Display for Schema {
Copy link
Contributor

Choose a reason for hiding this comment

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

😍

crates/iceberg/src/spec/schema.rs Outdated Show resolved Hide resolved
crates/iceberg/src/spec/schema.rs Show resolved Hide resolved
Copy link
Collaborator

@JanKaul JanKaul left a comment

Choose a reason for hiding this comment

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

LGTM, although I can't say that much to the visitor pattern. Thanks for working on this!

@liurenjie1024 liurenjie1024 force-pushed the renjie/issue-spec-visitor branch from 1167203 to 6af0393 Compare August 9, 2023 09:56
@liurenjie1024 liurenjie1024 force-pushed the renjie/issue-spec-visitor branch from 6af0393 to cd2e320 Compare August 9, 2023 11:22
@liurenjie1024
Copy link
Contributor Author

cc @Fokko Any other comments?

@Fokko Fokko merged commit 1a186d8 into apache:main Aug 10, 2023
@liurenjie1024 liurenjie1024 deleted the renjie/issue-spec-visitor branch August 11, 2023 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants