Skip to content

Conversation

simonvandel
Copy link
Contributor

@simonvandel simonvandel commented Aug 31, 2025

Which issue does this PR close?

Part of #14660

Rationale for this change

Draft until #17946 is merged. Then we can use the LogicalPlanBuilder

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

  • JOIN
  • PIVOT

I did not find any support for the pivot operation in Datafusion, so I added an initial implementation. This code could probably be used in a later PR to fix #12907

Are these changes tested?

Yes, I have added SLT tests

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 documentation Improvements or additions to documentation sql SQL Planner sqllogictest SQL Logic Tests (.slt) labels Aug 31, 2025
@simonvandel simonvandel mentioned this pull request Aug 31, 2025
18 tasks
@simonvandel simonvandel force-pushed the support-pipe-operator-3 branch from 443fdc1 to dc60f73 Compare September 1, 2025 19:02
@simonvandel simonvandel force-pushed the support-pipe-operator-3 branch from dc60f73 to b584074 Compare September 1, 2025 20:58
@simonvandel simonvandel marked this pull request as ready for review October 5, 2025 19:00
@simonvandel
Copy link
Contributor Author

Merged up from main, ready for review.
@Jefffrey has been so kind reviewing my previous pipe operator PRs, so I'm trying my luck again.

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.

Should we split this PR to only be for JOIN, and do PIVOT in a separate PR where it can hopefully use pivot from the logical plan builder if/when it gets merged?

@simonvandel
Copy link
Contributor Author

Good idea, created #17969

@simonvandel simonvandel marked this pull request as draft October 8, 2025 15:24
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.

Add pivot & unpivot (melt) to DataFrame
2 participants