hequn8128 commented on a change in pull request #11130:
[FLINK-15972][python][table-planner][table-planner-blink] Add Python building
blocks to make sure the basic functionality of Python TableFunction could work
URL: https://github.com/apache/flink/pull/11130#discussion_r384239756
##########
File path: flink-python/pyflink/fn_execution/coder_impl.py
##########
@@ -93,6 +93,30 @@ def __repr__(self):
return 'RowCoderImpl[%s]' % ', '.join(str(c) for c in
self._field_coders)
+class TableFunctionRowCoderImpl(StreamCoderImpl):
+
+ def __init__(self, row_coder):
+ self._row_coder = row_coder
+ self._field_count = row_coder._filed_count
+
+ def encode_to_stream(self, value, out_stream, nested):
+ if value is None:
+ self.write_finish_message(out_stream)
Review comment:
Avoid extra function call here(to avoid performance regression)? i.e., do
`out_stream.write_byte(0x00)` directly here.
----------------------------------------------------------------
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