docete commented on code in PR #24818:
URL: https://github.com/apache/flink/pull/24818#discussion_r1621677150
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/RawToBinaryCastRule.java:
##########
@@ -62,7 +62,7 @@ public boolean canFail(LogicalType inputLogicalType,
LogicalType targetLogicalTy
// new behavior
isNull$290 = isNull$289;
if (!isNull$290) {
- byte[] deserializedByteArray$76 =
result$289.toBytes(typeSerializer$292);
+ byte[] deserializedByteArray$76 =
result$289.toBytes(typeSerializer$292.getInnerSerializer());
Review Comment:
> Why do we actually need the call to `getInnerSerializer()` during runtime
shouldn't we simply use this serializer as the `typeSerializer$292` for code
generation? Or does the implementation not allow this?
I think the RAW type should bind with RawValueDataSerializer, and use
`getInnerSerializer()` in se/de phase. Follow the same pattern also make the
Generated code more clear. See: `AbstractBinaryWriter::writeRawValue`
--
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]