Revanth14 opened a new pull request, #2432:
URL: https://github.com/apache/iceberg-go/pull/2432

   ## Problem
   
   Predicates accept a NaN literal and bind it, so `x = NaN`, the ordering 
comparisons and `In`/`NotIn` give results that disagree between the Arrow row 
filter and `ExpressionEvaluator`. Java rejects a NaN literal when the 
expression is built. A NaN on a decimal column was worse: it bound as zero, so 
`dec = NaN` matched `0.00`.
   
   ## Fix
   
   The literal and set predicates' `Bind` return `ErrInvalidArgument` for a NaN 
float literal, pointing to `IsNaN` / `NotNaN`. The literal is checked before 
and after conversion to the term's type, which covers a NaN on a decimal or int 
column and the string `"NaN"` on a float column. `eqDeletePartitionsToFilter` 
now emits `IsNaN` for a NaN identity partition, as 
`BuildPartitionMatchPredicate` already does, so serializable conflict 
validation keeps working on those tables.
   
   ## Testing
   
   `TestBindRejectsNaNLiterals` covers every comparison and set operation on 
float32 and float64, the `"NaN"` string, decimal and int columns, and checks 
that `IsNaN`, `NotNaN` and infinities still bind. 
`TestRowDeltaValidate_NaNIdentityPartitionRejected` / `DifferentAllowed` run 
conflict validation end to end with a NaN partition; nothing covered that path 
before. Each fix was reverted to confirm its tests fail. Two existing tests 
dropped NaN-literal inputs that are now errors.
   
   ## Context
   
   Closes #2419. A release note covers the new error.


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