jayendra13 commented on code in PR #20864:
URL: https://github.com/apache/datafusion/pull/20864#discussion_r3124804246
##########
datafusion/sql/src/query.rs:
##########
@@ -215,6 +215,19 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
PipeOperator::Join(join) => {
self.parse_relation_join(plan, join, planner_context)
}
+ PipeOperator::Drop { columns } => {
+ let Some((first, rest)) = columns.split_first() else {
+ return plan_err!("DROP requires at least one column");
Review Comment:
I think the
https://github.com/google/googlesql/blob/master/docs/pipe-syntax.md#drop-pipe-operator
makes `column_name` required (`|> DROP column_name [, ...]`), which would make
this a parse error rather than a planner error, feels like it belongs in
sqlparser-rs instead. Could you confirm I'm reading the spec right? If so, I'll
fold the parser fix into this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]