Skip to content

Conversation

@devinjdangelo
Copy link
Contributor

Which issue does this PR close?

none

Rationale for this change

I noticed while working on #10767 some unparser methods have grown unwieldy and difficult to understand. This PR attempts to break some of the more confusing methods up with the aim of making them more easily readable.

What changes are included in this PR?

  • Break up handling of LogicalPlan::Projection nodes in select_to_sql_recursively into multiple helpers
  • Rewrite find_agg_node_within_select to use a match statement rather than several if lets

Are these changes tested?

Yes, by existing tests (no new features or bug fixes in this PR)

Are there any user-facing changes?

No, purely reorganizing code.

@github-actions github-actions bot added the sql SQL Planner label Jun 4, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks @devinjdangelo ! Looks good to me

@alamb alamb merged commit 1c85d6a into apache:main Jun 4, 2024
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sql SQL Planner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants