zhang-jianq commented on code in PR #13670:
URL: https://github.com/apache/gluten/pull/13670#discussion_r4679972576


##########
gluten-flink/runtime/src/main/java/org/apache/gluten/util/LogicalTypeConverter.java:
##########
@@ -67,6 +69,14 @@ private interface VLTypeConverter {
               logicalType -> new 
io.github.zhztheplayer.velox4j.type.VarCharType()),
           Map.entry(
               CharType.class, logicalType -> new 
io.github.zhztheplayer.velox4j.type.VarCharType()),
+          // Flink's BYTES/BINARY are both a byte array at runtime (RowData
+          // getBinary), and velox carries them as VARBINARY.
+          Map.entry(
+              VarBinaryType.class,
+              logicalType -> new 
io.github.zhztheplayer.velox4j.type.VarbinaryType()),
+          Map.entry(
+              BinaryType.class,
+              logicalType -> new 
io.github.zhztheplayer.velox4j.type.VarbinaryType()),

Review Comment:
   @ggjh-159 Thank you for review, it's addressed with the second option: the 
`BinaryType` mapping is removed, so fixed-length `BINARY(n)` is rejected at 
planning again. `LogicalTypeConverter` now maps `VarBinaryType` only; 
`LogicalTypeConverterTest` asserts the rejection; 
`testMd5CastToBinaryRejectedAtPlanning` pins `MD5(CAST(s AS BINARY(3)))` as a 
planning-time failure. The BYTES support is unchanged — the e2e dual-run over a 
raw-format BYTES column still matches native.



-- 
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]

Reply via email to