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


   # Proposed changes
   
   Issue Number: close #7570
   
   ## Problem Summary:
   
   explode_outer(ArrayColumn) desc:
   > Create a row for each element in the array column. Unlike explode, if the 
array is null or empty, it returns null.
   
   Usage example:
   1. create a table with array column, and insert some data;
   2. open enable_lateral_view and enable_vectorized_engine;
   ```
   set enable_lateral_view = true;
   set enable_vectorized_engine=true;
   ```
   3. use explode_outer
   ```
   > select * from array_test;
   +------+------+--------+
   | k1   | k2   | k3     |
   +------+------+--------+
   |    3 | NULL | NULL   |
   |    1 |    2 | [1, 2] |
   |    2 |    3 | NULL   |
   |    4 | NULL | []     |
   +------+------+--------+
   
   > select k1,explode_column from array_test LATERAL VIEW explode_outer(k3) 
TempExplodeView as explode_column;
   +------+----------------+
   | k1   | explode_column |
   +------+----------------+
   |    1 |              1 |
   |    1 |              2 |
   |    2 |           NULL |
   |    4 |           NULL |
   |    3 |           NULL |
   +------+----------------+
   ```
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   5. Has unit tests been added: (Yes/No/No Need)
   6. Has document been added or modified: (Yes/No/No Need)
   7. Does it need to update dependencies: (Yes/No)
   8. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   


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

Reply via email to