zhjwpku commented on code in PR #503:
URL: https://github.com/apache/iceberg-cpp/pull/503#discussion_r2681735606
##########
src/iceberg/expression/binder.cc:
##########
@@ -79,36 +96,47 @@ Result<std::shared_ptr<Expression>> Binder::Aggregate(
Result<bool> IsBoundVisitor::IsBound(const std::shared_ptr<Expression>& expr) {
ICEBERG_DCHECK(expr != nullptr, "Expression cannot be null");
IsBoundVisitor visitor;
- return Visit<bool, IsBoundVisitor>(expr, visitor);
+ auto visit_result = Visit<std::optional<bool>, IsBoundVisitor>(expr,
visitor);
+ ICEBERG_RETURN_UNEXPECTED(visit_result);
+ auto result = std::move(visit_result.value());
+ // If the result is null, return true
+ return result.value_or(true);
}
-Result<bool> IsBoundVisitor::AlwaysTrue() { return true; }
+Result<std::optional<bool>> IsBoundVisitor::AlwaysTrue() { return
std::nullopt; }
Review Comment:
Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]