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

   ## Which issue does this PR close?
   
   Closes #11464
   Closes #11408
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   ## Rationale for this change
   
   In https://github.com/apache/datafusion/pull/6091 we relaxed and allowed 
duplicated qualified fields in order to support duplicated group bys. This 
leads to some confusion and bugs as we do not allow for unqualified duplicated 
names. This makes the necessary changes to still support duplicated group by 
while still disallowing duplicated qualified names.
   
   <!--
    Why are you proposing this change? If this is already explained clearly in 
the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your 
changes and offer better suggestions for fixes.  
   -->
   
   ## What changes are included in this PR?
   
   Revert allowing duplicated qualified names from #6091
   
   Deduplicate group by exprs when creating output schema for 
LogicalPlan::Aggregate.
   
   Remove test case `with_column_self_join` as this test no fails already at 
the join, I don't think it possible to modify to fulfill it old purpose.
   
   The old logic in `plan_table_with_joins` would create schemas with 
duplicated fields as it would end up with multiple copies for the first table 
when there are multiple joins. I am not 100% this is the right fix, but it 
passes all existing test cases.
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ## Are these changes tested?
   Existing test cases.
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   ## Are there any user-facing changes?
   Since this adds new restrictions it possible that it will break downstream 
users depending on the old behavior.
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->
   


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to