Paul Lin created FLINK-25558:
--------------------------------

             Summary: TableResult OK may be empty if returned by multiple 
queries
                 Key: FLINK-25558
                 URL: https://issues.apache.org/jira/browse/FLINK-25558
             Project: Flink
          Issue Type: Bug
            Reporter: Paul Lin


Many queries return `TABLE_RESULT_OK`, which is a static member for reducing 
memory overhead. However, TableResult contains an iterator that can be read 
once. That means if a query returns `TABLE_RESULT_OK` and it is read,  
then`TABLE_RESULT_OK` returned by the following queries would be considered 
empty.

It can be reproduced by simply printing two query results.

```

tEnv.executeSql("create table tbl_a (a string)").print();

tEnv.executeSql("create table tbl_b (a string)").print();

```

The output would be

```

+--------+
| result |
+--------+
|     OK |
+--------+
1 row in set
Empty set

```

 

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to