SteNicholas commented on a change in pull request #13491:
URL: https://github.com/apache/flink/pull/13491#discussion_r495566600
##########
File path: flink-python/pyflink/table/table_environment.py
##########
@@ -1770,11 +1771,19 @@ def from_data_stream(self, data_stream: DataStream,
fields: List[str] = None) ->
of the Table
:return: The converted Table.
"""
- if fields is not None:
- j_table = self._j_tenv.fromDataStream(data_stream._j_data_stream,
fields)
- else:
+ j_table = None
+ if len(fields) == 0:
j_table = self._j_tenv.fromDataStream(data_stream._j_data_stream)
- return Table(j_table=j_table, t_env=self._j_tenv)
+ elif len(fields) == 1 and isinstance(fields[0], str):
+ j_table = self._j_tenv.fromDataStream(data_stream._j_data_stream,
fields[0])
Review comment:
@HuangXingBo Yes, I would like to add warn log to tell users with this
deprecated 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]