thswlsqls opened a new pull request, #9870: URL: https://github.com/apache/paimon/pull/9870
### Purpose fix #9869 - `needsEqualiser()` and `BinaryMapKeys.isBinary()` only matched `BINARY_STRING`, so GEOMETRY/GEOGRAPHY (also `byte[]`) were compared by identity: distinct `collect` / `merge_map` kept duplicates. - `FieldCollectAgg` built its equaliser only for distinct arrays, so a non-distinct binary `retract()` removed nothing. - Fix: `isBinary()` matches BINARY, VARBINARY, GEOMETRY, GEOGRAPHY (the `getBinary` roots of `createElementGetter`) and `needsEqualiser()` reuses it; the equaliser depends on the element type alone, `agg()` gates de-duplication on `distinct`. - Follow-up to #9249, which merged 3.5 hours after #9251 added geospatial types and deferred the retract gap. - Non-distinct retract of constructed elements now uses the generated equaliser (FLOAT/DOUBLE via `Float.compare`), like distinct. ### Tests - Added `FieldAggregatorTest#testFieldCollectAggWithDistinctGeospatial`, `#testFieldMergeMapAggWithGeospatialKey`, `#testFieldMergeMapWithKeyTimeAggWithGeospatialKey`, `#testFieldCollectAggRetractWithBinary` (fail without the fix), `#testFieldCollectAggKeepsDuplicatesWithBinary` (regression guard). - `FieldAggregatorTest`: 106 tests, 0 failures. - `mvn -pl paimon-core clean install` (checkstyle, spotless, enforcer, surefire) — 5441 tests, 0 failures; only `PostgresqlCatalogTest` (needs Docker) could not start locally. -- 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]
