Skip to content

Conversation

simonvandel
Copy link
Contributor

Which issue does this PR close?

Part of #14660

Rationale for this change

sqlparser 0.58 released with support for parsing pipe operators.
Let's see if we can make Datafusion support executing them.

What changes are included in this PR?

Support for the following pipe operators

  • WHERE
  • ORDER BY
  • LIMIT
  • SELECT
  • EXTEND

These were the ones I could manage in an evening, so I decided to flush this PR as-is.

Are these changes tested?

I added an SLT test for each operator. Please let me know if you want any other cases tested.

Are there any user-facing changes?

Yes, if the dialect is set to one that supports pipe operators, those can then be executed.

@github-actions github-actions bot added sql SQL Planner sqllogictest SQL Logic Tests (.slt) labels Aug 21, 2025
@simonvandel simonvandel mentioned this pull request Aug 21, 2025
18 tasks
@alamb
Copy link
Contributor

alamb commented Aug 21, 2025

😮 amazing

Can we please add some more examples / overview of the new syntax to the user guide:
https://datafusion.apache.org/user-guide/sql/index.html

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 22, 2025
@simonvandel
Copy link
Contributor Author

I have updated the user-guide.
Is this what you had in mind?

simonvandel added a commit to simonvandel/arrow-datafusion that referenced this pull request Aug 22, 2025
I noticed in apache#17278 that `from`
without an explicit projection did not work.
This should fix it
Jefffrey pushed a commit that referenced this pull request Aug 24, 2025
* Support from-first syntax

I noticed in #17278 that `from`
without an explicit projection did not work.
This should fix it

* add more tests

* document in user guide
@simonvandel simonvandel force-pushed the support-pipe-operators branch from 3b0892b to 1e0b8db Compare August 26, 2025 15:40
Copy link
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

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

I'm not as familiar with the sql codebase but if tests pass then seems fine 👍

Just a few minor comments otherwise.

@simonvandel
Copy link
Contributor Author

Thank you for the review @Jefffrey! I have pushed commits addressing each comment separately

Copy link
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Jefffrey
Copy link
Contributor

CI failure is unrelated to this PR, been seeing it across other PRs & on main

@Jefffrey Jefffrey added this pull request to the merge queue Sep 22, 2025
Merged via the queue into apache:main with commit 23d91c5 Sep 22, 2025
29 checks passed
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.

3 participants