execute_sql语句中等待的含义



我想知道在pyflink中使用和不使用wait()命令执行sql语句有什么区别和含义:

t_env.execute_sql(query)
t_env.execute_sql(query).wait()

我对这两种方法都进行了实验,但在执行上没有发现任何区别。

def wait(self, timeout_ms: int = None):
"""
Wait if necessary for at most the given time (milliseconds) for the data to be ready.
For a select operation, this method will wait until the first row can be accessed locally.
For an insert operation, this method will wait for the job to finish,
because the result contains only one row.
For other operations, this method will return immediately,
because the result is already available locally.
.. versionadded:: 1.12.0
"""

相关内容

  • 没有找到相关文章

最新更新