@@ -87,24 +87,15 @@ public static void sqlUpdate(StreamTableEnvironment tableEnv, String stmt) throw
8787 }
8888
8989 try {
90- tableEnv .insertInto (newTable , targetTableName );
90+ tableEnv .insertInto (targetTableName , newTable );
9191 } catch (Exception e ) {
9292 LOG .warn ("Field name case of query result and registered TableSink do not match. " , e );
9393 newTable = queryResult .select (String .join ("," , ignoreCase (queryFieldNames , sinkFieldNames )));
94- tableEnv .insertInto (newTable , targetTableName );
94+ tableEnv .insertInto (targetTableName , newTable );
9595 }
9696
9797 }
9898
99- private static SqlToOperationConverter createSqlToOperationConverter (FlinkPlannerImpl flinkPlanner , CatalogManager catalogManager )
100- throws NoSuchMethodException , IllegalAccessException , InvocationTargetException , InstantiationException {
101-
102- Constructor <SqlToOperationConverter > declaredConstructor = SqlToOperationConverter .class .getDeclaredConstructor (FlinkPlannerImpl .class , CatalogManager .class );
103- declaredConstructor .setAccessible (true );
104- SqlToOperationConverter sqlToOperationConverter = declaredConstructor .newInstance (flinkPlanner , catalogManager );
105- return sqlToOperationConverter ;
106- }
107-
10899 private static TableSink getTableSinkByPlanner (StreamPlanner streamPlanner , String targetTableName )
109100 throws NoSuchMethodException , IllegalAccessException , InvocationTargetException {
110101 Method getTableSink = PlannerBase .class .getDeclaredMethod ("getTableSink" , ObjectIdentifier .class );
0 commit comments