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


   ## Proposed changes
   
   The syntax:
   ```
   select k1, e1 from test lateral view explode_split(k1, ",") tmp as e1;
   ```
   ```explode_split``` is a special function of doris,
   which is used to separate the string column according to the specified split 
string,
   and then convert the row to column.
   This is a conforming function of string separation + table function,
   and its behavior is equivalent to explode in hive ```explode(split(string, 
string))```
   
   The implement:
   A tablefunction operator is added to the implementation to handle the syntax 
of the lateral view separately.
   The query plan is following:
   ```
   MySQL [test]> explain select k1, e1 from test_explode lateral view 
explode_split (k2, ",") tmp as e1;
   +---------------------------------------------------------------------------+
   | Explain String                                                            |
   +---------------------------------------------------------------------------+
   | PLAN FRAGMENT 0                                                           |
   |  OUTPUT EXPRS:`k1` | `e1`                                                 |
   |                                                                           |
   |   RESULT SINK                                                             |
   |                                                                           |
   |   1:TABLE FUNCTION NODE                                                   |
   |   |  table function: explode_split(`k2`, ',')                             |
   |   |                                                                       |
   |   0:OlapScanNode                                                          |
   |      TABLE: test_explode                                                  |
   +---------------------------------------------------------------------------+
   ```
   
   ## 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) WIP
   - [ ] 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 #ISSUE) 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 WIP
   - [ ] Any dependent changes have been merged
   
   ## Further comments
   
   This only the FE part of lateral view, so this is not a functions that can 
be used directly.


-- 
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-unsubscr...@doris.apache.org

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



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

Reply via email to