Uh oh!
There was an error while loading. Please reload this page.
GH-28074: [C++][Dataset] Handle NaNs correctly in Parquet predicate push-down - #15125
Conversation
westonpace
left a comment
There was a problem hiding this comment.
This looks like the right logic but I think we should be checking for NaN and not using is_valid (which checks for null).
So something like...
bool isNan(const Scalar& scalar) {
if (IsFloat(scalar)) {
const FloatScalar& float_scalar = checked_cast<const FloatScalar&>(scalar);
return isnan(float_scalar);
} else if (IsDouble(scalar)) {
// ...
} else {
return false;
}
}
Uh oh!
There was an error while loading. Please reload this page.
westonpace
left a comment
There was a problem hiding this comment.
This looks correct to me. @pitrou did you want to do a quick sanity check?
How hard would it be to mock up some kind of test to check this? Unfortunately, ColumnChunkStatisticsAsExpression isn't really a public method and so it might be tricky coming up with a test case without reproducing an offending parquet file which may not be easy to do.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
pitrou
commented
Jan 3, 2023
I agree we should ideally unit test |
wjones127
commented
Jan 23, 2023
I believe I have generated a file that could be used for a test case here: apache/parquet-testing#35 Does that seem sufficient? |
westonpace
commented
Feb 3, 2023
Looks like the parquet tests are failing because they can't find the parquet file. Do you maybe need to update the submodule version? I haven't done this recently and am not sure of the right commands. |
@westonpace |
westonpace
left a comment
There was a problem hiding this comment.
This looks good. I don't see a problem with updating the arrow testing repo but it might be nice to keep changes isolated if you can.
Uh oh!
There was an error while loading. Please reload this page.
sanjibansg
commented
Feb 7, 2023
Yes, of course, and sorry, I will be more careful next time. |
Uh oh!
There was an error while loading. Please reload this page.
westonpace
commented
Feb 9, 2023
Thanks! |
ursabot
commented
Feb 9, 2023
Benchmark runs are scheduled for baseline = 0a7e7fb and contender = 518fc51. 518fc51 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
This PR fixes the issue of handling NaNs in the Parquet predicate push-down.
While computing the valid bounds for a column, if the max or min of the column is null, the range should ignore that.