d0ad381833
* test: add spark query unit test and check grammar * test: add select explain、lateralSubQuery、transform unit test * chore: fileName exchange --------- Co-authored-by: dilu <dilu@dtstack.com>
15 lines
543 B
SQL
15 lines
543 B
SQL
-- LATERAL VIEW [ OUTER ] generator_function ( expression [ , ... ] ) [ table_alias ] AS column_alias [ , ... ]
|
|
|
|
SELECT * FROM person
|
|
LATERAL VIEW EXPLODE(ARRAY(30, 60)) tableName AS c_age
|
|
LATERAL VIEW EXPLODE(ARRAY(40, 80)) AS d_age;
|
|
|
|
SELECT c_age, COUNT(1) FROM person
|
|
LATERAL VIEW EXPLODE(ARRAY(30, 60)) AS c_age
|
|
LATERAL VIEW EXPLODE(ARRAY(40, 80)) AS d_age
|
|
GROUP BY c_age;
|
|
|
|
SELECT * FROM person LATERAL VIEW EXPLODE(ARRAY()) tableName AS c_age;
|
|
|
|
SELECT * FROM person LATERAL VIEW OUTER EXPLODE(ARRAY()) tableName AS c_age;
|