thswlsqls opened a new issue, #8762: URL: https://github.com/apache/paimon/issues/8762
**Search before asking** - [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar. **Paimon version** master @ 345526e26 / 2.0-SNAPSHOT **Compute Engine** Engine-agnostic (core / paimon-codegen) **Minimal reproduce step** `GenerateUtils.generateMapCompare()` (`paimon-codegen/.../codegen/GenerateUtils.scala` line 251) builds the value array type from `mapType.getKeyType` instead of `mapType.getValueType`, so a generated `MAP` comparator reads the value array with the key type. Reproduce with `CodeGenUtils.newRecordComparator(Arrays.asList(MAP(INT(), STRING())), new int[]{0})` comparing two maps with equal keys but different values (`{1 -> "a"}` vs `{1 -> "b"}`). **What doesn't meet your expectations?** Expected: values compared by the value type (STRING), so `{1->"a"} < {1->"b"}`. Actual: values read with the key type (INT) → wrong comparison result, or a `ClassCastException` when key and value types differ. **Anything else?** The sibling `generateMultisetCompare` (line 262-263) and `ScalarOperatorGens` (line 81) both pass key and value types separately, confirming the intended behavior. Introduced in the original MAP/MULTISET comparison support. **Are you willing to submit a PR?** - [x] I'm willing to submit a PR! -- 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]
