BiteTheDDDDt opened a new issue #8508:
URL: https://github.com/apache/incubator-doris/issues/8508


   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Description
   
   We can use `explode_numbers` to create a sequence.
   
   ### Use case
   
   ```SQL
   MySQL [test]> select e1 from (select 1 k1) as t lateral view 
explode_numbers(5) tmp1 as e1;
   +------+
   | e1   |
   +------+
   |    0 |
   |    1 |
   |    2 |
   |    3 |
   |    4 |
   +------+
   5 rows in set (0.014 sec)
   
   MySQL [test]> select e1 from (select 1 k1) as t lateral view 
explode_numbers(NULL) tmp1 as e1;
   +------+
   | e1   |
   +------+
   | NULL |
   +------+
   1 row in set (0.015 sec)
   
   MySQL [test]> select e1,E2 from (select 1 k1) as t lateral view 
explode_numbers(2) tmp1 as e1 lateral view explode_numbers(3) tmp2 as e2;
   +------+------+
   | e1   | E2   |
   +------+------+
   |    0 |    0 |
   |    1 |    0 |
   |    0 |    1 |
   |    1 |    1 |
   |    0 |    2 |
   |    1 |    2 |
   +------+------+
   6 rows in set (0.014 sec)
   ```
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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