wgtmac commented on code in PR #956:
URL: https://github.com/apache/iceberg-cpp/pull/956#discussion_r4294922648


##########
src/iceberg/expression/evaluator.cc:
##########
@@ -140,6 +141,7 @@ Result<std::unique_ptr<Evaluator>> Evaluator::Make(const 
Schema& schema,
                                                    std::shared_ptr<Expression> 
unbound,
                                                    bool case_sensitive) {
   ICEBERG_ASSIGN_OR_RAISE(auto bound_expr, Binder::Bind(schema, unbound, 
case_sensitive));
+  ICEBERG_ASSIGN_OR_RAISE(bound_expr, RewriteNot::Visit(bound_expr));

Review Comment:
   For non-equal UUIDs, `Literal::operator<=>` returns `unordered`. This makes 
both `u < A` and `u >= A` false.
   
   So for `u = B` where `B > A`, `NOT(u < A)` should be true, but this rewrite 
returns false. UUIDs should use unsigned byte-wise ordering before applying 
this rewrite. The same issue affects `ResidualEvaluator`.



-- 
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]

Reply via email to