Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. We propose to deprecate the following methods in TableEnvironment:

    • void sqlUpdate(String sql)

    • void insertInto(String targetPath, Table table)

    • void execute(String jobName)

    • String explain(boolean extended)

    • Table fromTableSource(TableSource<?> source)

  2. meanwhile, we propose to introduce the following new methods in TableEnvironment:
    • ResultTable executeStatement(String statement) 
      synchronously execute the given single statement immediately, and return the execution result.

      publicinterfaceResultTable {
          TableSchema getResultSchema();
          Iterable<Row> getResultRows();
      }

 

    • DmlBatch createDmlBatch()create a DmlBatch instance which can add dml statements or Tables to the batch and explain or execute them as a batch.

      interfaceDmlBatch{
               void addInsert(String insert);
               voidaddInsert(String targetPath, Table table);
               ResultTableexecute() throws Exception ;
             Stringexplain(boolean extended);
      }

  1. For current messy Flink table program trigger point, we propose that: for TableEnvironment and StreamTableEnvironment, you must use `TableEnvironment.execute()` to trigger table program execution, once you convert the table program to a DataStream program (through `toAppendStream` or `toRetractStream` method), you must use `StreamExecutionEnvironment.execute` to trigger the DataStream program.

...