thswlsqls opened a new pull request, #9860:
URL: https://github.com/apache/paimon/pull/9860
### Purpose
fix #9859
- `ScalarOperatorGens` array element and map value checks read only the
`generateEquals` flag (`false` when either operand is null), so `[1, null]` and
`{1 -> null}` never equal themselves. Add `nullSafeEquals` at the three sites,
as map keys and `EqualiserCodeGenerator` fields already do.
- #1214 introduced the element and HashMap value checks; #8534 added the
pairwise map path with null-safe key matching but the same flag-only value
check.
- Flink's `generateEquals` also feeds the SQL `=` three-valued path
(`ExprCodeGenerator` EQUALS); Paimon's only consumer, `RecordEqualiser`, is a
boolean value-equality contract.
- With `changelog-producer.row-deduplicate=true`, an unchanged `[1,
null]`/`{1 -> null}` upsert emitted a `-U`/`+U` pair from
`LookupChangelogMergeFunctionWrapper`; now none.
### Tests
- Added
`EqualiserCodeGeneratorTest#testArrayEqualiserTreatsNullElementsAsEqual`/`#testMapEqualiserTreatsNullValuesAsEqual`
(red pre-fix).
- `mvn -pl paimon-codegen -DfailIfNoTests=false clean install` (JDK 11):
BUILD SUCCESS, 233 tests, 0 failures.
--
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]