Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.18.1
-
None
-
None
Description
For instance, I created a table named 'table', and when executing tableEnvironment.from("table"), it results in an error message that reads: "You have an error in your SQL syntax; please consult the manual for the correct syntax to use near 'table' at line 1 corresponding to your MySQL server version." Even if I enclose the table name with backticks, the error continues to occur because these backticks are stripped within the flink-sql-parser's code.
In FLINK-16067 issue, there is a suggestion stating: "I propose making the parsing logic for identifiers in the Table API more flexible. We should not force users to escape any SQL identifiers." This explains why backticks are removed by the flink-sql-parser. However, this aspect seems to be overlooked in the flink-connector-jdbc's code.
If indeed this is a genuine issue, I would be more than happy to submit a Pull Request to fix it. Please assign it to me.