dianfu commented on a change in pull request #9370: [FLINK-13594][python]
Improve the 'from_element' method of flink python api to apply to blink planner
URL: https://github.com/apache/flink/pull/9370#discussion_r310954643
##########
File path: flink-python/pyflink/table/table_environment.py
##########
@@ -685,10 +685,16 @@ def __init__(self, j_tenv):
def _from_file(self, filename, schema):
gateway = get_gateway()
- jds = gateway.jvm.PythonBridgeUtils.createDataStreamFromFile(
- self._j_tenv.execEnv(), filename, True)
- return Table(gateway.jvm.PythonTableUtils.fromDataStream(
- self._j_tenv, jds, _to_java_type(schema)))
+ execution_config = self._j_tenv.execEnv().getConfig()
+
+ j_objs = gateway.jvm.PythonBridgeUtils.readPythonObjects(filename,
True)
Review comment:
Could you refactor the implementation of _from_file to remove the duplicate
codes in StreamTableEnvironment and BatchTableEnvironment?
----------------------------------------------------------------
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