Skip to content

feat: add Transform::ProjectStrict - #387

Merged
wgtmac merged 4 commits into
apache:mainfrom
zhjwpku:transform_strict_project
Dec 5, 2025
Merged

feat: add Transform::ProjectStrict#387
wgtmac merged 4 commits into
apache:mainfrom
zhjwpku:transform_strict_project

Conversation

@zhjwpku

@zhjwpku zhjwpku commented Dec 3, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

TEST_F(PredicateTest, BoundUnaryPredicateTestIsNull) {
ICEBERG_ASSIGN_OR_THROW(auto is_null_pred, Expressions::IsNull("name")->Bind(
*schema_, /*case_sensitive=*/true));
ICEBERG_UNWRAP_OR_FAIL(auto is_null_pred, Expressions::IsNull("name")->Bind(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

TBH, I think we should remove ICEBERG_UNWRAP_OR_FAIL in favor of ICEBERG_ASSIGN_OR_THROW because the former one cannot be used in functions with return type.

Comment thread src/iceberg/transform.cc
std::unreachable();
}

Result<std::unique_ptr<UnboundPredicate>> Transform::ProjectStrict(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Transform::ProjectStrict looks so similar to Transform::Project with the only difference being the calls to ProjectionUtil. Perhaps we can use template to dispatch it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

After trying it by myself, I don't think this can help reduce duplicate lines. Ignore the above comment.

Comment thread src/iceberg/util/projection_util_internal.h Outdated
@wgtmac
wgtmac force-pushed the transform_strict_project branch from ceeda1d to 407abc5 Compare December 4, 2025 14:59

@wgtmac wgtmac left a comment

Copy link
Copy Markdown
Member

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!

@wgtmac
wgtmac merged commit e684be2 into apache:main Dec 5, 2025
10 checks passed
@zhjwpku
zhjwpku deleted the transform_strict_project branch December 5, 2025 13:51
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.

2 participants