YinZheng-Sun commented on PR #956:
URL: https://github.com/apache/iceberg-cpp/pull/956#issuecomment-6080987568

   I noticed a difference in how Iceberg-CPP and Java handle null comparisons.
   
   Literal::operator<=> currently returns std::partial_ordering::unordered when 
either operand is null. Therefore, when key is null:
   
   key < 100         // false
   !(key < 100)      // true
   key >= 100        // false
   
   However, RewriteNot rewrites NOT(key < 100) into key >= 100. These 
expressions are not equivalent under the current C++ semantics. Using the 
rewritten expression for row-group pruning can discard rows that the original 
expression would match in Evaluator.
   Java’s literal comparator uses nullsFirst, under which both NOT(null < 100) 
and null >= 100 evaluate to false.
   Was treating null as unordered an intentional semantic choice in C++. Should 
we preserve this behavior and make the rewrite null-aware, or adopt Java’s 
nullsFirst comparison semantics?  @wgtmac Please let me know what you think. 
Thanks.


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