Skip to content

Conversation

@zhjwpku
Copy link
Collaborator

@zhjwpku zhjwpku commented Dec 7, 2025

No description provided.

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! I believe the current implementation can be greatly polished to make it not lengthy than the Java impl.

Comment on lines 207 to 211
ICEBERG_ASSIGN_OR_RAISE(auto value, expr->Evaluate(partition_data_));
if (value.IsNull()) {
return Expressions::AlwaysTrue();
}
return Expressions::AlwaysFalse();
Copy link
Member

Choose a reason for hiding this comment

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

We can make all these functions are a one-liner if we do:

namespace {
std::shared_ptr<Expression> always_true() { return True::Instance(); }
std::shared_ptr<Expression> always_false() { return False::Instance(); }
}  // namespace

  Result<std::shared_ptr<Expression>> IsNull(
      const std::shared_ptr<Bound>& expr) override {
    return expr->Evaluate(partition_data_).transform([](const auto& value) {
      return value.IsNull() ? always_true() : always_false();
    });
  }

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done.

@zhjwpku zhjwpku force-pushed the add_residual_evaluator branch 2 times, most recently from fc25e14 to 4bfa2b0 Compare December 10, 2025 15:40
@wgtmac wgtmac force-pushed the add_residual_evaluator branch from 6c8d0fd to ca7d59f Compare December 11, 2025 03:31
@wgtmac wgtmac merged commit 42aa1d0 into apache:main Dec 11, 2025
10 checks passed
@zhjwpku zhjwpku deleted the add_residual_evaluator branch December 11, 2025 12:50
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