[ 
https://issues.apache.org/jira/browse/FLINK-25558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Lin resolved FLINK-25558.
------------------------------
    Resolution: Fixed

> 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
>          Components: Table SQL / API
>    Affects Versions: 1.14.0
>            Reporter: Paul Lin
>            Priority: Major
>
> 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.7#820007)

Reply via email to