Syntax
T arr[position]
position
is 1-based and support negtive number.
positive position
example:
mysql> set enable_vectorized_engine=true;
mysql> SELECT id,c_array,c_array[-2] FROM `array_test`;
+------+-----------------+----------------------------------+
+------+-----------------+----------------------------------+
| 1 | [1, 2, 3, 4, 5] | 4 |
| 2 | [6, 7, 8] | 7 |
| 3 | [] | NULL |
+------+-----------------+----------------------------------+
ELEMENT_AT, SUBSCRIPT