[jira] [Commented] (FLINK-25272) Flink sql syntax analysis is inconsistent with the sql grammer declared now

2021-12-14 Thread Jianhui Dong (Jira)


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

Jianhui Dong commented on FLINK-25272:
--

Thank you for your reply, I'm sorry that I misunderstood these two words.

> Flink sql syntax analysis is inconsistent with the sql grammer declared now
> ---
>
> Key: FLINK-25272
> URL: https://issues.apache.org/jira/browse/FLINK-25272
> Project: Flink
>  Issue Type: Improvement
>  Components: Table SQL / API
>Reporter: Jianhui Dong
>Priority: Minor
>
> Syntax analysis in the 
> code(https://github.com/apache/flink/blob/master/flink-table/flink-sql-parser/src/main/codegen/includes/parserImpls.ftl)
>  is inconsistent with the grammar declared on the 
> module(https://github.com/apache/flink/edit/master/docs/content/docs/dev/table/sql/create.md).
> The document states that all CREATE statement formats are `CREATE TABLE [IF 
> NOT EXISTS]`, there is no `TEMPORAL` keywords, but in 
> flink-sql-parser/src/main/codegen/includes/parserImpls.ftl::SqlCreateExtended,
>  it will recorganize `TEMPORAL` token and set `isTemporary` with true if the 
> keyword exists.
> Besides, I think the field `isTemporary` is outdated too, every table in 
> Flink is a temporal table as the document wrote. In fact, when they are 
> stored in the catalog, they are all converted to `CatalogSchemaTable` which 
> inherits the `TemporalTable` interface.
> BTW, the view and the function have the same condition. IMO, I think we 
> should remove the `TEMPORAL` token in parserImpls.ftl and also remove the 
> `isTemporary` field which now always is false.
> This issue may be a little confused cause my English is not very well. If you 
> have any questions, you can add comments under the issue or contact me at 
> lam...@apache.org and I could also provide a pull request for this.



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


[jira] [Commented] (FLINK-25272) Flink sql syntax analysis is inconsistent with the sql grammer declared now

2021-12-13 Thread Wenlong Lyu (Jira)


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

Wenlong Lyu commented on FLINK-25272:
-

hi, [~lam167]  I think this is a doc missing issue instead of error in Parser. 
The key word is TEMPORARY  not TEMPORAL,  TEMPORARY is used to tell catalog not 
to persist the table defined by the DDL, the table is only available on current 
session.

> Flink sql syntax analysis is inconsistent with the sql grammer declared now
> ---
>
> Key: FLINK-25272
> URL: https://issues.apache.org/jira/browse/FLINK-25272
> Project: Flink
>  Issue Type: Improvement
>  Components: Table SQL / API
>Reporter: Jianhui Dong
>Priority: Minor
>
> Syntax analysis in the 
> code(https://github.com/apache/flink/blob/master/flink-table/flink-sql-parser/src/main/codegen/includes/parserImpls.ftl)
>  is inconsistent with the grammar declared on the 
> module(https://github.com/apache/flink/edit/master/docs/content/docs/dev/table/sql/create.md).
> The document states that all CREATE statement formats are `CREATE TABLE [IF 
> NOT EXISTS]`, there is no `TEMPORAL` keywords, but in 
> flink-sql-parser/src/main/codegen/includes/parserImpls.ftl::SqlCreateExtended,
>  it will recorganize `TEMPORAL` token and set `isTemporary` with true if the 
> keyword exists.
> Besides, I think the field `isTemporary` is outdated too, every table in 
> Flink is a temporal table as the document wrote. In fact, when they are 
> stored in the catalog, they are all converted to `CatalogSchemaTable` which 
> inherits the `TemporalTable` interface.
> BTW, the view and the function have the same condition. IMO, I think we 
> should remove the `TEMPORAL` token in parserImpls.ftl and also remove the 
> `isTemporary` field which now always is false.
> This issue may be a little confused cause my English is not very well. If you 
> have any questions, you can add comments under the issue or contact me at 
> lam...@apache.org and I could also provide a pull request for this.



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