-
Notifications
You must be signed in to change notification settings - Fork 72
[DF] Add support for CREATE TABLE | VIEW AS statements
#656
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
[DF] Add support for CREATE TABLE | VIEW AS statements
#656
Conversation
Codecov Report
@@ Coverage Diff @@
## datafusion-sql-planner #656 +/- ##
=========================================================
Coverage ? 66.13%
=========================================================
Files ? 73
Lines ? 3635
Branches ? 754
=========================================================
Hits ? 2404
Misses ? 1081
Partials ? 150 📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
ayushdg
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.
Minor suggestions but generally things lgtm!
| Some(create_memory_table) => Ok(format!("{}", create_memory_table.name)), | ||
| None => match &self.create_view { | ||
| Some(create_view) => Ok(format!("{}", create_view.name)), | ||
| None => panic!("Encountered a non CreateMemoryTable/CreateView type in get_name"), |
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.
We should try replacing the panic with a python error
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.
Good point - might also be worth it to do a follow up PR applying this change to some of the other plan types, which also panic in similar situations
jdye64
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.
Few nits but overall looks good. Thanks!
ayushdg
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 for this! Changes lgtm!
jdye64
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.
LGTM
Adds support for
CREATE TABLE ASandCREATE VIEW ASstatements. Some follow up stuff to look into:schema_namethrough DataFusion instead of hard-codingCreateTableAsPlugin.convertandContext.sqlin one utility function