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

[jira] [Updated] (FLINK-26495) Dynamic table options does not work for view

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

Jane Chan updated FLINK-26495:
------------------------------
    Description: 
The dynamic table options (aka. table hints) syntax
{code:java}
table_identifier /*+ OPTIONS(key=val [, key=val]*) */ {code}
does not work for the view without any exception thrown or suggestions to users. It is not user-friendly and misleading. We should either throw a meaningful exception or support this feature for view.

 
h4. How to reproduce

Run the following statements in SQL CLI
{code:java}
Flink SQL> create table datagen (f0 int, f1 double) with ('connector' = 'datagen', 'number-of-rows' = '5');
[INFO] Execute statement succeed.

Flink SQL> create view my_view as select * from datagen;
[INFO] Execute statement succeed.

Flink SQL> explain plan for select * from my_view /*+ OPTIONS('number-of-rows' = '1') */;
== Abstract Syntax Tree ==
LogicalProject(f0=[$0], f1=[$1])
+- LogicalTableScan(table=[[default_catalog, default_database, datagen]])


== Optimized Physical Plan ==
TableSourceScan(table=[[default_catalog, default_database, datagen]], fields=[f0, f1])


== Optimized Execution Plan ==
TableSourceScan(table=[[default_catalog, default_database, datagen]], fields=[f0, f1]) {code}

  was:
The dynamic table options (aka. table hints) syntax
{code:java}
table_identifier /*+ OPTIONS(key=val [, key=val]*) */ {code}
does not work for the view without any exception thrown or suggestions to users. It is not user-friendly and misleading. We should either throw a meaningful exception or support this feature for view.


> Dynamic table options does not work for view
> --------------------------------------------
>
>                 Key: FLINK-26495
>                 URL: https://issues.apache.org/jira/browse/FLINK-26495
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / API
>    Affects Versions: 1.15.0
>            Reporter: Jane Chan
>            Priority: Major
>
> The dynamic table options (aka. table hints) syntax
> {code:java}
> table_identifier /*+ OPTIONS(key=val [, key=val]*) */ {code}
> does not work for the view without any exception thrown or suggestions to users. It is not user-friendly and misleading. We should either throw a meaningful exception or support this feature for view.
>  
> h4. How to reproduce
> Run the following statements in SQL CLI
> {code:java}
> Flink SQL> create table datagen (f0 int, f1 double) with ('connector' = 'datagen', 'number-of-rows' = '5');
> [INFO] Execute statement succeed.
> Flink SQL> create view my_view as select * from datagen;
> [INFO] Execute statement succeed.
> Flink SQL> explain plan for select * from my_view /*+ OPTIONS('number-of-rows' = '1') */;
> == Abstract Syntax Tree ==
> LogicalProject(f0=[$0], f1=[$1])
> +- LogicalTableScan(table=[[default_catalog, default_database, datagen]])
> == Optimized Physical Plan ==
> TableSourceScan(table=[[default_catalog, default_database, datagen]], fields=[f0, f1])
> == Optimized Execution Plan ==
> TableSourceScan(table=[[default_catalog, default_database, datagen]], fields=[f0, f1]) {code}



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