zhang-jianq opened a new pull request, #13670: URL: https://github.com/apache/gluten/pull/13670
### What changes are proposed in this pull request? Flink's hash expressions accept BYTES and hash the raw bytes, but gluten-flink supports VARCHAR only: a BYTES column failed at planning with `Unsupported logical type: BYTES NOT NULL` before the hash converter was reached, and velox registered VARCHAR signatures only ([apache/gluten#13635](https://github.com/apache/gluten/issues/13635)). The velox flinksql functions now carry the VARBINARY signatures ([bigo-sg/velox#102](https://github.com/bigo-sg/velox/pull/102)); this PR adds the gluten-flink side: - `LogicalTypeConverter`: map Flink `BYTES` / `BINARY(n)` to the velox4j `VarbinaryType` (length dropped, same as `CHAR(n)` to VARCHAR). - `ArrowVectorWriter` / `ArrowVectorAccessor`: add the Varbinary writer and accessor (`ArrowType.Binary` over `VarBinaryVector`); the accessor returns `byte[]`, Flink's runtime representation of BYTES, so a BYTES column crosses the Flink -> velox boundary. - `TypeUtils`: comment only. BINARY has flinksql registrations for the hash family only, so it stays out of `isScalarType` and guards like `IFNULL(bytes_col)` still fail at planning time instead of at runtime. - Tests: `LogicalTypeConverterTest` (BYTES/BINARY(n) mapping), `FlinkRowToVLVectorConvertorTest` (binary round-trip over non-UTF-8 / empty / NULL) and `HashFunctionsTest` (a CAST-to-BYTES path and a genuine filesystem raw-format BYTES source column with non-UTF-8 bytes). **Note on the velox4j ref** — `gluten-flink/velox4j-ref.txt` currently points at the velox4j PR head ([bigo-sg/velox4j#79](https://github.com/bigo-sg/velox4j/pull/79), which bumps the velox ref to [bigo-sg/velox#102](https://github.com/bigo-sg/velox/pull/102)) so the dependent CI can validate the full stack while those PRs are under review; once they merge, the pin moves to the merged commit on `gluten-20260829`. ### How was this patch tested? - gluten-flink/ut: `HashFunctionsTest` (18 cases), `LogicalTypeConverterTest` (6 cases) and `FlinkRowToVLVectorConvertorTest` (4 cases) pass. - End-to-end dual-run on Flink 1.19.2 (native vs gluten-offloaded, print-sink changelog compared as exact multisets): `hash_binary.sql` projects `MD5` / `SHA1` / `SHA2(x, 256)` / `SHA224` / `SHA256` / `SHA384` / `SHA512` over a raw-format filesystem BYTES column (`ab`, a NUL + non-UTF-8 byte, 你好's UTF-8 bytes) -- 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]
