-
Notifications
You must be signed in to change notification settings - Fork 74
feat: add update table properties support #363
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
Conversation
5f98124 to
387401a
Compare
11604e3 to
ce0b6ea
Compare
ce0b6ea to
d50ffd6
Compare
wgtmac
left a comment
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.
This looks good now. I just left some minor comments.
| "counts"; | ||
|
|
||
| auto result = MetricsConfig::VerifyReferencedColumns(updates, *schema_); | ||
| EXPECT_FALSE(result.has_value()) |
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.
nit: you can #include "iceberg/test/matchers.h" and then write
EXPECT_THAT(result, IsError(ErrorKind::kValidationFailed));
EXPECT_THAT(result, HasErrorMessage("..."));
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.
Replace all EXPECT_xxx(result.has_value()) with EXPECT_THAT(result, IsError/IsOk);
| UpdateProperties(TableIdentifier identifier, std::shared_ptr<Catalog> catalog, | ||
| std::shared_ptr<TableMetadata> metadata); |
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.
Sounds good. I still suggest renaming metadata to base to make it explicit.
Do we need to check if catalog or base is null? We cannot throw in the ctor, perhaps we should check them in Apply and Commit.
| /// | ||
| /// \param format The file format type to use as default | ||
| /// \return Reference to this UpdateProperties for chaining | ||
| UpdateProperties& DefaultFormat(FileFormatType format); |
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.
Yes I understand. I still think we don't need special case the file format config to make the API simple. The Java impl seems have some historical reasons and we don't need to follow everything.
d50ffd6 to
2b308fb
Compare
2b308fb to
04505a4
Compare
wgtmac
left a comment
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.
Thanks for working on this! LGTM
No description provided.