wuchong commented on a change in pull request #11296: [FLINK-16363] [table] 
Correct the execution behavior of TableEnvironment and StreamTableEnvironment
URL: https://github.com/apache/flink/pull/11296#discussion_r389604101
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
 ##########
 @@ -738,13 +738,17 @@ protected void validateTableSource(TableSource<?> 
tableSource) {
                TableSourceValidation.validateTableSource(tableSource, 
tableSource.getTableSchema());
        }
 
-       protected List<Transformation<?>> translate() {
-               List<Transformation<?>> transformations = 
translate(bufferedModifyOperations);
-               bufferedModifyOperations.clear();
+       protected List<Transformation<?>> translateAndClearBuffer() {
+               List<Transformation<?>> transformations;
+               try {
+                       transformations = translate(bufferedModifyOperations);
+               } finally {
 
 Review comment:
   Could you add a comment on this that why do we force to clear buffers even 
if the `translate()` failed?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to