Syntax

    1. mysql> set enable_vectorized_engine=true;
    2. mysql> select k1,k2,size(k2) from array_test;
    3. +------+-----------+------------+
    4. | k1 | k2 | size(`k2`) |
    5. | 1 | [1, 2, 3] | 3 |
    6. | 2 | [] | 0 |
    7. +------+-----------+------------+
    8. mysql> select k1,k2,array_size(k2) from array_test;
    9. +------+-----------+------------------+
    10. | k1 | k2 | array_size(`k2`) |
    11. +------+-----------+------------------+
    12. | 1 | [1, 2, 3] | 3 |
    13. +------+-----------+------------------+
    14. mysql> select k1,k2,cardinality(k2) from array_test;
    15. +------+-----------+-------------------+
    16. | k1 | k2 | cardinality(`k2`) |
    17. +------+-----------+-------------------+
    18. | 1 | [1, 2, 3] | 3 |
    19. | 2 | [] | 0 |