zhang-jianq commented on code in PR #13670:
URL: https://github.com/apache/gluten/pull/13670#discussion_r4679991803
##########
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,
Review Comment:
Thank you for review, it's fixed with a planning-time rejection in the CAST
branch of `RexNodeConverter`, following the style of the existing TIME guard: a
cast whose operand is in the BINARY family and whose result is in the CHARACTER
family is rejected (via `SqlTypeFamily`). The check is directional: `CAST(s AS
BYTES)` stays offloaded, since both sides take the string's UTF-8 bytes.
`testCastBytesToStringRejectedAtPlanning` pins the rejection over a non-UTF-8
source
--
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]