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