Limits
- Currently, Lateral Join is only used with unnest() to achieve column-to-row conversion. Other table functions and UDTFs will be supported later.
- Currently, Lateral Join does not support subqueries.
Use Lateral Join
Syntax:
NOTE
If you want to perform unnest on multiple columns, you must specify an alias for each column, for example, select v1, t1.unnest as v2, t2.unnest as v3 from lateral_test, unnest(v2) t1, unnest(v3) t2;.
The database supports type conversion among BITMAP, STRING, ARRAY, and Column.

Usage examples
Together with unnest(), you can achieve the following column-to-row conversion features:Expand a string into multiple rows
-
Create a table and insert data into this table.
-
Query data before expansion.
Text
-
Expand
v2into multiple rows.Text
Expand an array into multiple rows
From v2.5, unnest() can take multiple arrays of different types and lengths. For more information, see unnest().-
Create a table and insert data into this table.
-
Query data before expansion.
Text
-
Expand
v2into multiple rows.Text
Expand Bitmap data
You can use Lateral Join with the unnest_bitmap function to expand Bitmap data.-
Create a table and insert data into this table.
-
Query data before expansion.
Text
-
Insert a new row.
Text
-
Expand data in
v2into multiple rows.Text