You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/29 03:55:10 UTC

[GitHub] [arrow-datafusion] jackwener opened a new pull request, #4412: add a rule to merge SubqueryAlias.

jackwener opened a new pull request, #4412:
URL: https://github.com/apache/arrow-datafusion/pull/4412

   # Which issue does this PR close?
   
   <!--
   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.
   -->
   
   Closes #4383.
   
   # Rationale for this change
   
   <!--
    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?
   
   <!--
   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.
   -->
   
   Merge SubqueryAlias.
   
   # Are these changes tested?
   
   <!--
   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)?
   -->
   
   test
   - merge two alias.
   - merge three alias (optimize again after optimize self)
   
   # Are there any user-facing changes?
   
   <!--
   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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] alamb commented on pull request #4412: Avoid adding redundant SubqueryAlias.

Posted by GitBox <gi...@apache.org>.
alamb commented on PR #4412:
URL: https://github.com/apache/arrow-datafusion/pull/4412#issuecomment-1333623437

   Converting to a draft so we don't accidentally merge it


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] mingmwang commented on pull request #4412: add a rule to merge SubqueryAlias.

Posted by GitBox <gi...@apache.org>.
mingmwang commented on PR #4412:
URL: https://github.com/apache/arrow-datafusion/pull/4412#issuecomment-1330706629

   In physical plan, there is no SubqueryAlias either.  I think SubqueryAlias can be remove earlier to simply other logical rules.


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] alamb commented on pull request #4412: Avoid adding redundant SubqueryAlias.

Posted by GitBox <gi...@apache.org>.
alamb commented on PR #4412:
URL: https://github.com/apache/arrow-datafusion/pull/4412#issuecomment-1345528952

   I wonder if this PR is still relevant


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] jackwener commented on pull request #4412: add a rule to merge SubqueryAlias.

Posted by GitBox <gi...@apache.org>.
jackwener commented on PR #4412:
URL: https://github.com/apache/arrow-datafusion/pull/4412#issuecomment-1330710406

   > I think SubqueryAlias is just temp struct in the plan tree for scoping names. The SubqueryAlias should be removed totally from the plan tree at an early phase of the logical planing by modifying the inner plan's qualify names.
   > Then the rest of the other logical rules do not need to deal with SubqueryAlias anymore.
   
   Look like we can add it in planner.
   
   When we add `subquery alias`, if child is `subquery alias`, we just need to change the name.
   
   I don't have much preference for these two options.


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] jackwener commented on pull request #4412: Avoid adding redundant SubqueryAlias.

Posted by GitBox <gi...@apache.org>.
jackwener commented on PR #4412:
URL: https://github.com/apache/arrow-datafusion/pull/4412#issuecomment-1345562288

   > I wonder if this PR is still relevant
   
   I should close it๐Ÿ˜‚.
   This optimization is more complicated than I thought at the beginning, I am ready to do more complete optimization.


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] jackwener commented on pull request #4412: Avoid adding redundant SubqueryAlias.

Posted by GitBox <gi...@apache.org>.
jackwener commented on PR #4412:
URL: https://github.com/apache/arrow-datafusion/pull/4412#issuecomment-1333390223

   wait for merge it. It will cause another bug could not be reproduced.


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] jackwener closed pull request #4412: Avoid adding redundant SubqueryAlias.

Posted by GitBox <gi...@apache.org>.
jackwener closed pull request #4412: Avoid adding redundant SubqueryAlias.
URL: https://github.com/apache/arrow-datafusion/pull/4412


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] mingmwang commented on pull request #4412: add a rule to merge SubqueryAlias.

Posted by GitBox <gi...@apache.org>.
mingmwang commented on PR #4412:
URL: https://github.com/apache/arrow-datafusion/pull/4412#issuecomment-1330674904

   I think SubqueryAlias is just temp struct in the plan tree for scoping names. The SubqueryAlias should be removed totally from the plan tree at an early phase of the logical planing.


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] jackwener commented on pull request #4412: Avoid adding redundant SubqueryAlias.

Posted by GitBox <gi...@apache.org>.
jackwener commented on PR #4412:
URL: https://github.com/apache/arrow-datafusion/pull/4412#issuecomment-1338780084

   More optimization https://github.com/apache/arrow-datafusion/pull/4484#issuecomment-1338696095
   
   I will try to do include https://github.com/apache/arrow-datafusion/pull/4484#issuecomment-1338760893
   
   It's from comment @mingmwang in #4484 


-- 
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-unsubscribe@arrow.apache.org

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