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

   ## Problem
   
   A column missing from an older data file reads as NULL, and a stored NULL 
matches `NotNaN`. But `scanTranslator.VisitBound` folds every predicate on a 
missing column, other than `IsNull`, to `AlwaysFalse`. So `NotNaN(x)` skipped 
the old file's rows while `NOT(IsNaN(x))` returned them. The same fold also 
builds the row-group pruning filter.
   
   ## Fix
   
   Both missing-column branches, plain column without an initial default and 
absent variant column, go through one helper. `IsNull` and `NotNaN` fold to 
`AlwaysTrue`, everything else to `AlwaysFalse`. This matches Java's 
`Evaluator`, where `notNaN(null)` is true.
   
   ## Testing
   
   - `TestTranslateColumnNamesMissingColumnIsNull`: the fold for each predicate 
on a missing column and on an absent variant column.
   - `TestArrowScanFiltersMissingColumnWithoutDefault`: after adding an 
optional column, `NotNaN(x)` and `NOT(IsNaN(x))` both return the old file's 
rows.
   
   Without the fix, the three `NotNaN` cases fail. `go test -race ./...` passes.
   
   Fixes #2133.
   


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