You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++][Parquet] Min Max stats are wrong when the value of a column are both infinity or -infinity #47426
Describe the bug, including details regarding any error messages, version, and platform.
When writing parquet files, if the value of a float or double column are both infinity or -infinity, the min and max stats of this column is wrong.
For example, suppose the column is float, and all values are -std::numeric_limits::infinity(), the min and max collected in TypeStatisticsImpl are [-Inf, std::numeric_limits::lowest()].
But the actual result should be [-Inf, -Inf].
changed the title [-][C++] Min Max stats are wrong when the value of a column are both infinity or -infinity[/-][+][C++][Parquet] Min Max stats are wrong when the value of a column are both infinity or -infinity[/+]on Dec 3, 2025
This was fixed by #50183 (GH-50182), released in Arrow 25.0.0. DefaultMin()/DefaultMax() in cpp/src/parquet/statistics.cc now seed the running min/max with +Inf/-Inf for floating-point types (including FLOAT16) instead of numeric_limits<T>::max()/lowest(), so an all--Inf column now reports [-Inf, -Inf] as expected. TestFloatStatistics.Infinities in statistics_test.cc covers FLOAT, DOUBLE and FLOAT16.
Note for anyone arriving from facebookincubator/velox#14603: Velox vendors a copy of this file under velox/dwio/parquet/writer/arrow/Statistics.cpp, so it needs to pick up the equivalent change separately.
Note: I used Claude Code to help research this, but I read the ticket, the code and the linked commits myself and the conclusion here is mine, not the tool's.
Activity
[-][C++] Min Max stats are wrong when the value of a column are both infinity or -infinity[/-][+][C++][Parquet] Min Max stats are wrong when the value of a column are both infinity or -infinity[/+]fix: Incorrect min max stats when the column value are infinity or -i…
fix: Incorrect min max stats when the column value are infinity or -i…
stackedsax commentedon Oct 4, 2026
This was fixed by #50183 (GH-50182), released in Arrow 25.0.0.
DefaultMin()/DefaultMax()incpp/src/parquet/statistics.ccnow seed the running min/max with+Inf/-Inffor floating-point types (includingFLOAT16) instead ofnumeric_limits<T>::max()/lowest(), so an all--Infcolumn now reports[-Inf, -Inf]as expected.TestFloatStatistics.Infinitiesinstatistics_test.cccovers FLOAT, DOUBLE and FLOAT16.Quick check on 25.0.0 or later:
Note for anyone arriving from facebookincubator/velox#14603: Velox vendors a copy of this file under
velox/dwio/parquet/writer/arrow/Statistics.cpp, so it needs to pick up the equivalent change separately.@thisisnic I think this can be closed as a duplicate of #50182
Note: I used Claude Code to help research this, but I read the ticket, the code and the linked commits myself and the conclusion here is mine, not the tool's.
thisisnic commentedon Oct 4, 2026
Looks good to me; this code is where it was fixed; closing.
arrow/cpp/src/parquet/statistics.cc
Lines 90 to 107 in e85e181
PingLiuPing commentedon Oct 8, 2026
Thank you for the fix and summary.