sundy-li / databend

FuseQuery is a Distributed SQL Query Engine at scale
Other
2 stars 0 forks source link

bug: COPY INTO <location> from table does not support tables that with quoting #79

Closed sundy-li closed 3 weeks ago

sundy-li commented 3 weeks ago

Search before asking

Version

v1.2.618-nightly

What's Wrong?

Trying to COPY INTO gcs from table with dashes in name gives error. Works fine for table with no dashes

How to Reproduce?

CREATE table t1 (c1 int null);
CREATE table "t-2" (c1 int null);

select * from default.t1;

COPY INTO 'gcs://projects/tables/t1'
CONNECTION = (
    CREDENTIAL = '<snip>'
)
FROM default.t1
FILE_FORMAT = (TYPE = PARQUET);

select * from default."t-2";

COPY INTO 'gcs://projects/tables/t-2'
CONNECTION = (
    CREDENTIAL = '<snip>'
)
FROM default."t-2"
FILE_FORMAT = (TYPE = PARQUET);
SQL:1:32
  |
1 | SELECT * FROM default.default.t-2
  |                                ^ unexpected `-`, expecting `AT`, `CHANGES`, `WITH`, <Ident>, <LiteralString>, `IDENTIFIER`, `AS`, `PIVOT`, `UNPIVOT`, `SAMPLE`, `ROW`, `BLOCK`, `(`, `LiteralAtString`, `LATERAL`, `NATURAL`, `INNER`, `LEFT`, `SEMI`, `RIGHT`, `ANTI`, `FULL`, `CROSS`, `JOIN`, `ON`, `USING`, `,`, `WHERE`, `GROUP`, `HAVING`, `WINDOW`, `QUALIFY`, `UNION`, `EXCEPT`, `INTERSECT`, `FROM`, `SELECT`, `VALUES`, `ORDER`, `LIMIT`, `OFFSET`, `IGNORE_RESULT`, `FORMAT`, or `;`

} cause: null

Are you willing to submit PR?

dosubot[bot] commented 3 weeks ago

I found a similar open issue: bug: COPY INTO does not support tables that need quoting. This issue was last updated on August 28, 2024, and currently has no comments or solution [1].

To continue talking to Dosu, mention @dosu.