thswlsqls opened a new pull request, #17055: URL: https://github.com/apache/iceberg/pull/17055
Closes #17053 ## Summary - `VarWidthBinaryDictEncodedReader.nextVal()` called `buffer.array()`/`buffer.arrayOffset()` directly, which throws `UnsupportedOperationException` when the dictionary's `ByteBuffer` is not array-backed (e.g. direct). - Replaced this with `BaseVariableWidthVector.setSafe(int, ByteBuffer, int, int)`, which delegates to `ArrowBuf.setBytes` and safely copies both direct and heap buffers, so no `hasArray()` branch is needed. - Matches the same-module sibling readers that already guard this: `VectorizedPlainValuesReader.readBinary()`, `VectorizedDeltaLengthByteArrayValuesReader.readBinary()`, `VectorizedDeltaEncodedValuesReader.unpackMiniBlock()`. ## Testing done - Added `TestVectorizedDictionaryEncodedParquetValuesReader#varWidthBinaryDictEncodedReaderHandlesNonArrayBackedByteBuffer` — a custom `Dictionary` returns a `Binary` backed by a direct (non-array-backed) `ByteBuffer`; verified the test throws `UnsupportedOperationException` before this fix and passes after. - `./gradlew :iceberg-arrow:check` — 30 tests 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
