hhhizzz commented on PR #23028:
URL: https://github.com/apache/datafusion/pull/23028#issuecomment-4758643705

   @neilconway
   Thanks for taking a look and for the concrete test case. You were correct: 
the original aggregate-pruning approach was not the right fix, and the added 
SLTs passed because `optimize_projections` already handles that part.
   
   I reworked the PR to fix the FD propagation issue in 
`calc_func_dependencies_for_project` instead. The projection remapping now 
preserves one output slot per projection expression, using a sentinel for 
computed / non-input expressions, so later passthrough columns are remapped to 
the correct output positions.
   
   I also dropped the previous aggregate planning changes and added a focused 
regression test for the computed-column-before-PK case:
   `projection_with_leading_computed_column_preserves_pk`.
   
   I also ran a debug SF10 TPC-DS all-query run for this path and it completed 
with 0 failures and Q39 recovered, but I am treating that only as diagnostic 
evidence rather than a formal benchmark claim.
   
   Thanks again for pointing me at the right root cause.


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