Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: COPY INTO <location> does not support tables that need quoting #16294

Closed
1 of 2 tasks
rad-pat opened this issue Aug 20, 2024 · 2 comments · Fixed by #16333
Closed
1 of 2 tasks

bug: COPY INTO <location> does not support tables that need quoting #16294

rad-pat opened this issue Aug 20, 2024 · 2 comments · Fixed by #16333
Assignees
Labels
C-bug Category: something isn't working

Comments

@rad-pat
Copy link

rad-pat commented Aug 20, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

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?

  • Yes I am willing to submit a PR!
@rad-pat rad-pat added the C-bug Category: something isn't working label Aug 20, 2024
@rad-pat
Copy link
Author

rad-pat commented Aug 20, 2024

I am able to run the following SQL, is this going to perform the same?

COPY INTO 'gcs://projects/tables/t-2'
CONNECTION = (
	CREDENTIAL = '<snip>'
)
FROM (SELECT * FROM default."t-2")
FILE_FORMAT = (TYPE = PARQUET);

@Dousir9
Copy link
Member

Dousir9 commented Aug 20, 2024

I am able to run the following SQL, is this going to perform the same?

COPY INTO 'gcs://projects/tables/t-2'
CONNECTION = (
	CREDENTIAL = '<snip>'
)
FROM (SELECT * FROM default."t-2")
FILE_FORMAT = (TYPE = PARQUET);

Yeah.

@sundy-li sundy-li self-assigned this Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants