You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Paul Lin (Jira)" <ji...@apache.org> on 2022/01/06 16:44:00 UTC

[jira] [Commented] (FLINK-25558) TableResult OK may be empty if returned by multiple queries

    [ https://issues.apache.org/jira/browse/FLINK-25558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470039#comment-17470039 ] 

Paul Lin commented on FLINK-25558:
----------------------------------

Working on the fix. Please assign this issue to me.

> 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.1#820001)