You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/11/18 11:49:31 UTC

[GitHub] [incubator-doris] EmmyMiao87 opened a new pull request #7148: [Lateral View] Pruning output slot of TableFunctionNode

EmmyMiao87 opened a new pull request #7148:
URL: https://github.com/apache/incubator-doris/pull/7148


   ## Proposed changes
   
   If the calculation of the lateral view function is completed,
   the result will be directly returned to the upper layer.
   It will cause a lot of memory copy and network transmission.
   The reason is that the original column that generally participates
   in the lateral view is very likely to be a very long value.
   If Doris still retain this column after calculating the lateral view,
   it need to perform a memory copy.
   However, in many cases, the upper plan node does not need the original columns of the lateral view,
   so it is necessary to perform column pruning after the calculation of the lateral view,
   so as to avoid useless memory copy and network transmission.
   For example, the following query can prune the original column v1
   ```select k1, e1 from table lateral view explode_split(v1, ",") tmp as e1;```
   
   The `outputSlotIds` in TableFunctionNode is used to store the columns that should be retained after pruning.
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [ ] Bugfix (non-breaking change which fixes an issue)
   - [x] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   - [ ] Code refactor (Modify the code structure, format the code, etc...)
   - [ ] Optimization. Including functional usability improvements and performance improvements.
   - [ ] Dependency. Such as changes related to third-party components.
   - [ ] Other.
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [x] I have created an issue on (Fix #6746 ) and described the bug/feature there in detail
   - [x] Compiling and unit tests pass locally with my changes
   - [x] I have added tests that prove my fix is effective or that my feature works
   - [ ] If these changes need document changes, I have updated the document
   - [ ] Any dependent changes have been merged
   


-- 
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: commits-unsubscribe@doris.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman merged pull request #7148: [Lateral View] Pruning output slot of TableFunctionNode

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #7148:
URL: https://github.com/apache/incubator-doris/pull/7148


   


-- 
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: commits-unsubscribe@doris.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] github-actions[bot] commented on pull request #7148: [Lateral View] Pruning output slot of TableFunctionNode

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7148:
URL: https://github.com/apache/incubator-doris/pull/7148#issuecomment-973845627






-- 
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: commits-unsubscribe@doris.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] github-actions[bot] commented on pull request #7148: [Lateral View] Pruning output slot of TableFunctionNode

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7148:
URL: https://github.com/apache/incubator-doris/pull/7148#issuecomment-979286981


   PR approved by at least one committer and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #7148: [Lateral View] Pruning output slot of TableFunctionNode

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #7148:
URL: https://github.com/apache/incubator-doris/pull/7148#discussion_r752289824



##########
File path: fe/fe-core/src/main/java/org/apache/doris/planner/TableFunctionNode.java
##########
@@ -29,14 +32,22 @@
 import org.apache.doris.thrift.TTableFunctionNode;
 
 import java.util.List;
+import java.util.Set;
 import java.util.stream.Collectors;
 
+import com.clearspring.analytics.util.Lists;
+import org.glassfish.jersey.internal.guava.Sets;

Review comment:
       wrong imports

##########
File path: gensrc/thrift/PlanNodes.thrift
##########
@@ -658,6 +658,7 @@ struct TOlapRewriteNode {
 
 struct TTableFunctionNode {
     1: required list<Exprs.TExpr> fnCallExprList
+    2: required list<Types.TSlotId> outputSlotIds

Review comment:
       Better to change both fields as `optional`




-- 
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: commits-unsubscribe@doris.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org