The meaning of wait in execute_sql statement

Viewed 92

I was wondering what is the difference and implications of executing sql statements in pyflink with and without wait() command:

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

I experimented with both, and see no difference in execution.

1 Answers
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
    """
Related