The Parquet spec (in parquet.thrift) says the following about handling of floating-point statistics:
* (*) Becausethesortingorderisnotspecifiedproperlyforfloating
* pointvalues (relationsvs. totalordering) thefollowing
* compatibilityrulesshouldbeappliedwhenreadingstatistics:
* - IftheminisaNaN, itshouldbeignored.
* - IfthemaxisaNaN, itshouldbeignored.
* - Iftheminis +0, therowgroupmaycontain -0valuesaswell.
* - Ifthemaxis -0, therowgroupmaycontain +0valuesaswell.
* - WhenlookingforNaNvalues, minandmaxshouldbeignored.
It appears that the dataset code uses the following filter expression when doing Parquet predicate push-down (in file_parquet.cc):
return and_(greater_equal(field_expr, literal(min)),
less_equal(field_expr, literal(max)));
A NaN value will fail that filter and yet may be found in the given Parquet column chunk.
We may instead need a "greater_equal_or_nan" comparison that returns true if either value is NaN.
Reporter: Antoine Pitrou / @pitrou
Assignee: Sanjiban Sengupta / @sanjibansg
Related issues:
PRs and other links:
Note: This issue was originally created as ARROW-12264. Please see the migration documentation for further details.
The Parquet spec (in parquet.thrift) says the following about handling of floating-point statistics:
It appears that the dataset code uses the following filter expression when doing Parquet predicate push-down (in
file_parquet.cc):A NaN value will fail that filter and yet may be found in the given Parquet column chunk.
We may instead need a "greater_equal_or_nan" comparison that returns true if either value is NaN.
Reporter: Antoine Pitrou / @pitrou
Assignee: Sanjiban Sengupta / @sanjibansg
Related issues:
PRs and other links:
Note: This issue was originally created as ARROW-12264. Please see the migration documentation for further details.