dawidwys commented on a change in pull request #10068:
[FLINK-13702][FLINK-13740] Fixed issues with generic types and materialization
of lazy binary formats in blink planner
URL: https://github.com/apache/flink/pull/10068#discussion_r342003589
##########
File path:
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryWriter.java
##########
@@ -68,7 +69,7 @@
void writeRow(int pos, BaseRow value, BaseRowSerializer type);
- void writeGeneric(int pos, BinaryGeneric value);
+ void writeGeneric(int pos, BinaryGeneric value, BinaryGenericSerializer
innerSerializer);
Review comment:
I considered that. The thing is that from the interface perspective imho it
makes more sense to use `BinaryGenericSerializer` here. In the end we are
serializing the `BinaryGeneric` the inner serializer is an implementation
detail.
Moreover this method is called from couple of places, e.g.
`CodeGenUtils#binaryWriterWriteField` where it transitively calls
`InternalSerializers#create`. I am pretty sure it should return the
`BinaryGenericSerializer` rather than the internal one.
Generally speaking I think it is safer to assume the BinaryGenericSerializer
in this method. This way we limit the scope of extracting the inner serializer
to a single method.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services