[ https://issues.apache.org/jira/browse/FLINK-16422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17053058#comment-17053058 ]
Danny Chen commented on FLINK-16422: ------------------------------------ Thanks [~gyfora] for reporting this issue ~ If a use writes a SQL with reserved keyword(i.e. DEFAULT), the parser (Flink uses JavaCC) would detect that and reports some error, just like what you have encountered. Flink use Apache Calcite's hints propt directly, it looks up the possible next identifiers from the current SQL scope/namespace, so theoretically, it is hard (for current code base) to identifier if the prompted name is a reserved keyword(this info is always maintained in the sql-parser). A better way is you added the quotes (backquote for Flink) for these words manually. > Cannot use [catalog].[db].table with Hive catalog > ------------------------------------------------- > > Key: FLINK-16422 > URL: https://issues.apache.org/jira/browse/FLINK-16422 > Project: Flink > Issue Type: Bug > Components: Connectors / Hive, Table SQL / Client > Affects Versions: 1.10.0 > Reporter: Gyula Fora > Priority: Major > > When trying to select a table from the Hive , the SQL CLI automcompletes to > the full table name: > select * from hive.default.itemtransactions ; > but then we get the following error: > [ERROR] Could not execute SQL statement. Reason: > org.apache.flink.table.api.SqlParserException: SQL parse failed. Encountered > ". default" at line 1, column 19. > Was expecting one of:... -- This message was sent by Atlassian Jira (v8.3.4#803005)