Skip to content

feat: add DROP pipe operator support#20864

Open
jayendra13 wants to merge 2 commits intoapache:mainfrom
jayendra13:pipe-drop-operator
Open

feat: add DROP pipe operator support#20864
jayendra13 wants to merge 2 commits intoapache:mainfrom
jayendra13:pipe-drop-operator

Conversation

@jayendra13
Copy link

Which issue does this PR close?

Rationale for this change

The DROP pipe operator (|> DROP x, y) is part of the BigQuery pipe syntax tracked in #14660. It removes columns from the output, equivalent to SELECT * EXCEPT(x, y).

What changes are included in this PR?

  • Added PipeOperator::Drop match arm in query.rs that reuses existing SELECT * EXCEPT infrastructure (WildcardOptions with ExceptSelectItem)
  • Added SLT tests covering single column drop, multi-column drop, chaining with other pipe operators, and error case for non-existent columns
  • Added DROP to the pipe operator documentation in select.md

Are these changes tested?

Yes, four sqllogictest cases added in pipe_operator.slt:

  • Drop two columns
  • Drop single column
  • Chained with WHERE
  • Error on non-existent column

Are there any user-facing changes?

Yes, users can now use |> DROP column1, column2 in pipe operator queries (BigQuery dialect).

@github-actions github-actions bot added documentation Improvements or additions to documentation sql SQL Planner sqllogictest SQL Logic Tests (.slt) labels Mar 11, 2026
@jayendra13 jayendra13 mentioned this pull request Mar 11, 2026
18 tasks
Copy link
Contributor

@simonvandel simonvandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool, thanks. The changes look good to me.

I'm not a committer, so someone else needs to do the final review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation sql SQL Planner sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support SQL pipe operator

2 participants