Add Create Schema functionality in SQL#1959
Conversation
|
I'm working on this and im wondering why |
|
This has surprisingly been a bit of a pain. Currently having issues with getting the schema registration to work. At the moment its not clear to me what the issue is. |
| "test".into(), | ||
| Arc::new(DataFrameImpl::new(self.state.clone(), &plan)), | ||
| )?; | ||
| let schem_reg_res = catalog.register_schema(&schema_name, schema); |
There was a problem hiding this comment.
It's not clear to me why registering schema here isnt working. I reregister the catalog below just in case but still has no effect. I wasnt expecting to have to reregister. Still digging deep into the implementations to get better idea whats going on.
There was a problem hiding this comment.
(i know theres a lot of fluff right now that im using for debugging purposes)
|
Got this working. Just need to resolve conflicts. @alamb do you have preference on whether to leave this PR as is or if i can also add |
4e44f4d to
ff3aabb
Compare
|
Ah need to do ballista update still |
I suggest we do it in a follow on PR to keep this one smaller.
seems reasonable (sorry for the delayed replies -- I am only inline intermittently this week) |
0ec8628 to
877ccd6
Compare
|
@alamb i believe this is ready now |
| }, | ||
| _ => Self::Bare { table: s }, | ||
| } | ||
| } |
alamb
left a comment
There was a problem hiding this comment.
Looks good to me -- thanks @doki23 and @matthewmturner !
|
|
||
| #[tokio::test] | ||
| async fn sql_create_schema() -> Result<()> { | ||
| // the information schema used to introduce cyclic Arcs |
There was a problem hiding this comment.
not sure what this comment means
There was a problem hiding this comment.
oops that may have been straggling comment from a copy paste, sry about that. i can remove in subsequent PR
| if_not_exists, | ||
| .. | ||
| }) => { | ||
| // sqlparser doesnt accept database / catalog as parameter to CREATE SCHEMA |
There was a problem hiding this comment.
maybe worth a ticket to sqlparser to support this? Or maybe just a PR :)
|
|
||
| let schema = catalog.schema(&schema_name); | ||
|
|
||
| match (if_not_exists, schema) { |
Which issue does this PR close?
Task 1 for #1877
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?