Skip to content

Doc:Add escape in the SQL statement in the flink engine document#3076

Merged
openinx merged 3 commits intoapache:masterfrom
hililiwei:#3075
Sep 6, 2021
Merged

Doc:Add escape in the SQL statement in the flink engine document#3076
openinx merged 3 commits intoapache:masterfrom
hililiwei:#3075

Conversation

@hililiwei
Copy link
Contributor

@hililiwei hililiwei commented Sep 5, 2021

about #3075
the default keyword is used in the SQL statement in the Flink document, but the example does not add escape, so the statement cannot be run directly.
such as:

CREATE TABLE hive_catalog.default.sample (
    id BIGINT COMMENT 'unique id',
    data STRING
);

An error will be reported when the statement is executed:

[ERROR] Could not execute SQL statement. Reason:
org.apache.flink.sql.parser.impl.ParseException: Encountered ". default" at line 1, column 27.

modify the SQL:

CREATE TABLE hive_catalog.`default`.sample (
    id BIGINT COMMENT 'unique id',
    data STRING
);

the above statements can be executed normally.

@github-actions github-actions bot added the docs label Sep 5, 2021

```sql
CREATE TABLE hive_catalog.default.sample (
CREATE TABLE hive_catalog.`default`.sample (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hililiwei to address this issue, I think we can quote all the identifiers (include catalog identifier, database name, table name) , that looks more unified.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.Done.

@hililiwei hililiwei requested a review from openinx September 6, 2021 11:50
@openinx openinx merged commit a3b72fc into apache:master Sep 6, 2021
@openinx
Copy link
Member

openinx commented Sep 6, 2021

Get this merged, Thanks @hililiwei for contributing !

@hililiwei hililiwei deleted the #3075 branch September 6, 2021 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments