zhangyue19921010 opened a new pull request, #11360: URL: https://github.com/apache/paimon/pull/11360
### Purpose Fixes #11359. Return NULL for array subscripts outside the bounds, matching Hive's standard list inspector. A direct projection such as `SELECT arr[-1] FROM t` currently fails on an ordinary append table when Hive evaluates the subscript against the Paimon list inspector. Check the index before accessing the internal array. Valid elements, NULL arrays, and NULL elements keep their existing behavior. ### Tests - `HiveOnMrReadITCase#testArraySubscriptOutsideBounds`: direct Hive query over an ordinary append table, including valid indices, negative and oversized indices, empty arrays, and NULL arrays. The query fails before the fix. - `PaimonListObjectInspectorTest`: actual Hive index UDF, standard-inspector comparison, integer boundary indices, generic and binary arrays, and NULL inputs. This run passed all nine scoped Maven tests (eight inspector cases and the direct SQL regression) with Checkstyle, Spotless, and Enforcer enabled. A separately compiled copy of the unchanged current-base inspector reproduces the direct SQL failure. Validated with Hive 2.3.10 on JDK 11. An earlier broader run at the same final commit passed 49 tests, including all eight list-inspector cases and the direct SQL regression, with Checkstyle, Spotless, and Enforcer enabled. Three unchanged SerDe tests encountered Parquet classpath linkage errors; all three passed in a separate JUnit Platform run with matching Parquet 1.16.0 classes first. The affected module's source RAT check also passed. -- 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]
