Handle empty value between two comma when cast string to array type. before: mysql> select cast("[a,b,c,,,,]" as array<string>); +-----------------------------------+ | CAST('[a,b,c,,,,]' AS ARRAY<TEXT>) | +-----------------------------------+ | ['a', 'b', 'c', ',', ','] | +-----------------------------------+ 1 row in set (0.01 sec) after: mysql> select cast("[a,b,c,,,,]" as array<string>); +-----------------------------------+ | CAST('[a,b,c,,,,]' AS ARRAY<TEXT>) | +-----------------------------------+ | ['a', 'b', 'c', '', '', ''] | +-----------------------------------+ 1 row in set (0.01 sec)
In compute level, CHAR type will shrink suffix zeros. To keep the logic the same as CHAR type, we also shrink for ARRAY or ARRAY<ARRAY> types. Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
cast(array<not_null> as array<>)
1. add dryRun option to list tests 2. group all cases into p0 p1 p2