Skip to content

[mosaic] Drop float bounds that can hide NaN or -0.0 - #10730

Open
thswlsqls wants to merge 1 commit into
apache:masterfrom
thswlsqls:fix/mosaic-float-bounds-nan-signed-zero
Open

thswlsqls wants to merge 1 commit into
apache:masterfrom
thswlsqls:fix/mosaic-float-bounds-nan-signed-zero

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Purpose

fix #10728

Tests

  • Added MosaicFloatingPointBoundsTest: table reads with NaN-first and signed-zero rows (FLOAT and DOUBLE), asserting the planned split, the row-group read and the filtered result. Red on master at both levels, green now. Single row group only; engine SQL not run.
  • Updated MosaicSimpleStatsExtractorTest expectations.
  • mvn -pl paimon-mosaic clean install: 162 tests, 0 failures.

The native Mosaic writer updates FLOAT/DOUBLE min/max with a partial
comparison: a leading NaN pins both bounds to NaN, a later NaN never
enters the bounds, and -0.0 equals +0.0. Paimon compares bounds with
compareTo, so manifest pruning and row-group pruning could skip files
and row groups that still contain matching rows. Mosaic stats carry no
NaN count, so such bounds cannot be detected and are no longer used.
Null counts are kept.

Generated-by: Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Mosaic FLOAT/DOUBLE stats can skip rows when data contains NaN or -0.0

1 participant