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

[DISCUSS] Remove FORMAT <..> backwards compatibility options from COPY #9905

Closed
alamb opened this issue Apr 1, 2024 · 5 comments · Fixed by #9985
Closed

[DISCUSS] Remove FORMAT <..> backwards compatibility options from COPY #9905

alamb opened this issue Apr 1, 2024 · 5 comments · Fixed by #9985
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@alamb
Copy link
Contributor

alamb commented Apr 1, 2024

Is your feature request related to a problem or challenge?

@tinfoil-knight added backwards compatibility to the COPY command format options in version 37.0.0 via #9744

So now this format is supported (similar to duckdb)

COPY (select * from (values (1))) to 'test_files/scratch/copy/'
OPTIONS (format json, compression gzip);

However, the newer more consistent syntax looks like

COPY (select * from (values (1))) to 'test_files/scratch/copy/'
STORED AS JSON
OPTIONS (compression gzip);

@metesynnada asked #9753 (review) if we should phase out the old (format json) syntax

Describe the solution you'd like

Decide if filing this ticket to discuss

Describe alternatives you've considered

No response

Additional context

No response

@alamb alamb added the enhancement New feature or request label Apr 1, 2024
@alamb
Copy link
Contributor Author

alamb commented Apr 1, 2024

cc @devinjdangelo

@metesynnada
Copy link
Contributor

cc @ozankabak.

I'm in favour of phasing out this syntax because it's getting hard to keep up with.

Users will mostly use COPY test TO sa.parquet, which we already support. If they need to state the format, COPY test TO sa.tbl STORED AS CSV should be enough. Choosing a format directly is rarer than letting the system figure it out.

@alamb alamb changed the title [DISCUSS] Remove FORMAT <..> backwards compatibility options from COPT [DISCUSS] Remove FORMAT <..> backwards compatibility options from COPY Apr 2, 2024
@devinjdangelo
Copy link
Contributor

I think it is reasonable to phase out the format option in favor of the STORED AS keyword.

@alamb
Copy link
Contributor Author

alamb commented Apr 2, 2024

Great, so sounds good. I think then this is a good first issue -- basically revert #9744 and fixup any tests that are needed

@tinfoil-knight
Copy link
Contributor

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants