feat: add residual evaluator - #402
Merged
Merged
Conversation
HuaHuaY
reviewed
Dec 7, 2025
HuaHuaY
approved these changes
Dec 8, 2025
wgtmac
requested changes
Dec 10, 2025
wgtmac
left a comment
Member
There was a problem hiding this comment.
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(); |
Member
There was a problem hiding this comment.
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();
});
}
zhjwpku
force-pushed
the
add_residual_evaluator
branch
2 times, most recently
from
December 10, 2025 15:40
fc25e14 to
4bfa2b0
Compare
wgtmac
force-pushed
the
add_residual_evaluator
branch
from
December 11, 2025 03:31
6c8d0fd to
ca7d59f
Compare
wgtmac
approved these changes
Dec 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.