The explode_json_array_double_outer table function accepts a JSON array. Its implementation logic is to convert the JSON array to an array type and then call the explode_outer function for processing. The behavior is equivalent to: explode_outer(cast(<json_array> as Array<DOUBLE>)). It should be used together with LATERAL VIEW.
EXPLODE_JSON_ARRAY_DOUBLE_OUTER(<json>)
<json> JSON type, the content should be an array.<json>. The column type is Nullable<DOUBLE>.<json> is NULL or an empty array (number of elements is 0), 1 row with NULL is returned.create table example( k1 int ) properties( "replication_num" = "1" ); insert into example values(1);
select * from example lateral view explode_json_array_double_outer('[4, 5, 5.23, null]') t2 as c;
+------+------+ | k1 | c | +------+------+ | 1 | 4 | | 1 | 5 | | 1 | 5.23 | | 1 | NULL | +------+------+
select * from example lateral view explode_json_array_double_outer('[123.445, 9223372036854775807.0, 9223372036854775808.0, -9223372036854775808.0, -9223372036854775809.0]') t2 as c;
+------+------------------------+ | k1 | c | +------+------------------------+ | 1 | 123.445 | | 1 | 9.223372036854776e+18 | | 1 | 9.223372036854776e+18 | | 1 | -9.223372036854776e+18 | | 1 | -9.223372036854776e+18 | +------+------------------------+
select * from example lateral view explode_json_array_double_outer('[]') t2 as c;
+------+------+ | k1 | c | +------+------+ | 1 | NULL | +------+------+
select * from example lateral view explode_json_array_double_outer(NULL) t2 as c;
+------+------+ | k1 | c | +------+------+ | 1 | NULL | +------+------+
select * from example lateral view explode_json_array_double_outer('{}') t2 as c;
+------+------+ | k1 | c | +------+------+ | 1 | NULL | +------+------+