-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Pipeline stor insert #12859
base: main
Are you sure you want to change the base?
Pipeline stor insert #12859
Conversation
) -> Result<PipelineData, ShellError> { | ||
let span = call.head; | ||
let table_name: Option<String> = call.get_flag(engine_state, stack, "table-name")?; | ||
let columns: Option<Record> = call.get_flag(engine_state, stack, "data-record")?; | ||
let columns: Option<Record> = match input { |
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 probably check if both input
and --data-record
parameter are used together and provide an error message. Seems crazy, I know, but people will do it.
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.
Would ShellError::IncompatibleParameters
be the right thing to return from this?
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.
ya, that sounds good.
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.
Just a couple more comments. Thanks!
There is another PR #12882 that helps with this and may supersede this. Do you plan on continuing this? |
Also asking the same question here that I did on #12882 - Looking at the commit, this doesn't appear to handle a |
Description
This should fix #11433. Changes allow the stor insert command to accept pipelined input as an alternative to command line argument
User-Facing Changes
No breaking changes, only the addition of this new feature.
Tests + Formatting
Added an example test in stor/insert.rs :
After Submitting