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

"CREATE TABLE (REPLACE TABLE) ... AS SELECT" Support #438

Closed
sungwy opened this issue Feb 16, 2024 · 2 comments
Closed

"CREATE TABLE (REPLACE TABLE) ... AS SELECT" Support #438

sungwy opened this issue Feb 16, 2024 · 2 comments

Comments

@sungwy
Copy link
Collaborator

sungwy commented Feb 16, 2024

Feature Request / Improvement

In Spark SQL, we have the ability to combine the table overwrite using AS SELECT statement, with create_table or replace_table, as an atomic operation. (CTAS, RTAS)

Do we intend to support this feature with the same atomicity guarantee in PyIceberg?

Since the PyIceberg client is in charge of writing out the manifests and constructing the new table metadata, I think it is technically possible. Would we just add

as_select: pa.Table = None

as an optional parameter to create_table and replace_table and add a snapshot update with full table static overwrite to the new table metadata?

@Fokko Fokko added this to the PyIceberg 0.7.0 release milestone Feb 22, 2024
@Fokko
Copy link
Contributor

Fokko commented Feb 22, 2024

Duplicate of #281

@Fokko Fokko marked this as a duplicate of #281 Feb 22, 2024
@sungwy
Copy link
Collaborator Author

sungwy commented Feb 22, 2024

Duplicate of #281

This was my bad attempt at decoupling the introduction of REPALCE TABLE support from the discussion of how we should support ... AS SELECT semantic - but I think it's a bit too late for that now given how I've described the previous issue #281. I will bring these points back to the other issue.

@sungwy sungwy closed this as completed Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants