explode_numbers

description

Table functions must be used in conjunction with Lateral View.

Get a number sequence [0,n).

grammar:

  1. explode_numbers(n)

example

  1. mysql> select e1 from (select 1 k1) as t lateral view explode_numbers(5) tmp1 as e1;
  2. +------+
  3. | e1 |
  4. +------+
  5. | 0 |
  6. | 1 |
  7. | 2 |
  8. | 3 |
  9. | 4 |
  10. +------+

keywords

explode,numbers,explode_numbers