You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/transform-v2/sql-functions.md
+15-8
Original file line number
Diff line number
Diff line change
@@ -1035,17 +1035,24 @@ select ARRAY(column1,column2,column3) as arrays
1035
1035
1036
1036
notes: Currently only string, double, long, int types are supported
1037
1037
1038
-
### LATERAL VIEW
1038
+
### LATERAL VIEW
1039
1039
#### EXPLODE
1040
1040
1041
-
explode array column to rows.
1042
-
OUTER EXPLODE will return NULL, while array is NULL or empty
1043
-
EXPLODE(SPLIT(FIELD_NAME,separator))Used to split string type. The first parameter of SPLIT function is the field name, the second parameter is the separator
1044
-
EXPLODE(ARRAY(value1,value2)) Used to custom array type.
1041
+
Used to flatten array columns into multiple rows. It applies the EXPLODE function to an array and generates a new row for each element.
1042
+
1043
+
EXPLODE: Converts an array column into multiple rows. No rows generated if array is NULL or empty.
1044
+
1045
+
OUTER EXPLODE: Returns NULL when array is NULL or empty, ensuring at least one row is generated.
1046
+
1047
+
EXPLODE(SPLIT(field_name, separator)): Splits a string into an array using the specified separator, then explodes it into rows.
1048
+
1049
+
EXPLODE(ARRAY(value1, value2, ...)): Explodes a custom-defined array into multiple rows.
1050
+
1051
+
Example:
1045
1052
```
1046
-
SELECT * FROM dual
1047
-
LATERAL VIEW EXPLODE ( SPLIT ( NAME, ',' ) ) AS NAME
0 commit comments