-
Notifications
You must be signed in to change notification settings - Fork 392
feat(datafusion): Support CREATE EXTERNAL TABLE with catalog #2022
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
base: main
Are you sure you want to change the base?
Conversation
liurenjie1024
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @CTTY for this pr, just finished first round of review, it looks great!
| let table_ident = TableIdent::new(namespace.clone(), name.clone()); | ||
|
|
||
| // Check if table exists before attempting to load | ||
| if !catalog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When datafusion calls this method to create a table, it already has deregistered table. But since datafusion allows no-iceberg catalog to register iceberg table, this check may still miss match. I think we should do is that:
if catalog.table.exists(...) {
return Error::new(ErrorKind::DataInvalid, "Table already exists in iceberg catalog ..., this maybe a misconfig datafusion catalog provider vs iceberg catalog.");
}
|
|
||
| # Create external table with bare name (uses "default" namespace) | ||
| statement ok | ||
| CREATE EXTERNAL TABLE ns_table STORED AS ICEBERG LOCATION '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a test for partitioned table?
Which issue does this PR close?
CREATE EXTERNAL TABLEbacked by a Catalog with DataFusion #2021What changes are included in this PR?
CREATE EXTERNAL TABLEwith catalog so the table is writableAre these changes tested?
Added some uts and sqllogictests