Skip to content

Conversation

@WZhuo
Copy link
Contributor

@WZhuo WZhuo commented Nov 28, 2025

No description provided.

@WZhuo WZhuo force-pushed the update_properties branch 23 times, most recently from 5f98124 to 387401a Compare December 2, 2025 03:04
@WZhuo WZhuo force-pushed the update_properties branch 5 times, most recently from 11604e3 to ce0b6ea Compare December 2, 2025 12:28
@WZhuo WZhuo force-pushed the update_properties branch from ce0b6ea to d50ffd6 Compare December 3, 2025 02:02
Copy link
Member

@wgtmac wgtmac left a 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())
Copy link
Member

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("..."));

Copy link
Contributor Author

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);

Comment on lines 43 to 44
UpdateProperties(TableIdentifier identifier, std::shared_ptr<Catalog> catalog,
std::shared_ptr<TableMetadata> metadata);
Copy link
Member

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);
Copy link
Member

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.

@WZhuo WZhuo force-pushed the update_properties branch from d50ffd6 to 2b308fb Compare December 3, 2025 03:30
@WZhuo WZhuo force-pushed the update_properties branch from 2b308fb to 04505a4 Compare December 3, 2025 03:37
Copy link
Member

@wgtmac wgtmac left a 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

@wgtmac wgtmac changed the title feat: update table properties api feat: add update table properties support Dec 3, 2025
@wgtmac wgtmac merged commit c472f3c into apache:main Dec 3, 2025
10 checks passed
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.

3 participants