ahlag opened a new pull request, #26443:
URL: https://github.com/apache/datafusion/pull/26443

   ## Which issue does this PR close?
   
   - Part of #26298.
   
   ## Rationale for this change
   
   `select_to_sql_recursively` handles every `LogicalPlan` variant inline, 
which makes a change to one plan shape hard to review on its own. This is the 
first mechanical step from the issue: keep the function as a dispatcher and 
move one arm at a time into its own method.
   
   ## What changes are included in this PR?
   
   - The `Join` arm moves into `Unparser::join_to_sql`, next to 
`asof_join_to_sql`, with the same `(query, select, relation)` arguments. The 
body is unchanged apart from rustfmt re-wrapping it at the new indentation.
   - `join_to_sql` is `#[inline(never)]` like `asof_join_to_sql`, so its locals 
stay out of the recursive function's stack frame.
   
   I started with `Join` because it is self-contained (it only reads `join` and 
the three builders) and no open PR touches it. #24455 changes the `Union` arm, 
so I left that one for later. I named the method after `asof_join_to_sql` 
rather than the `select_join` naming in the issue. Happy to switch if you 
prefer the `select_*` names for the whole series.
   
   ## What is the testing strategy for this PR?
   
   No behavior change, so no new tests. The existing unparser tests cover the 
join paths: `datafusion-sql` (including `tests/cases/plan_to_sql.rs`) and 
`core_integration` `sql::unparser` / `sql::joins`.
   
   ## Are there any user-facing changes?
   
   No.
   
   AI use: I used Claude Code to move the arm and run the checks. I reviewed 
the diff and checked that the moved body matches the original apart from 
formatting.
   


-- 
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]

Reply via email to