-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: fill missing values with NULLs while inserting #8146
Conversation
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.
Thank you for the contribution @jonahgao -- it looks really nice to me as always.
@@ -1098,7 +1103,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> { | |||
.collect::<Vec<_>>(), | |||
) | |||
} else { | |||
let mut mapping = vec![None; table_schema.fields().len()]; | |||
let mut value_indices = vec![None; table_schema.fields().len()]; |
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.
I like the new name value_indicies
much better
Values: (Int64(1), Utf8("Alan"), Utf8("Turing")) | ||
"# | ||
.trim(); | ||
let plan = "Dml: op=[Insert Into] table=[person]\ |
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 @jonahgao |
Which issue does this PR close?
Closes #8091.
Rationale for this change
If user does not provide a value for certain columns during insertion, NULL will be filled as their default values.
What changes are included in this PR?
Are these changes tested?
Yes
Are there any user-facing changes?
No