presto-main/src/main/java/io/prestosql/operator/scalar/ArrayElementAtFunction.java/ArrayElementAtFunction/blockElementAt
class ArrayElementAtFunction:    @TypeParameter("E")
    @SqlNullable
    @SqlType("E")
    public static Block blockElementAt(@TypeParameter("E") Type elementType, @SqlType("array(E)") Block array, @SqlType("bigint") long index)
    {
        int position = checkedIndexToBlockPosition(array, index);
        if (position == -1) {
            return null;
        }
        if (array.isNull(position)) {
            return null;
        }

        return (Block) elementType.getObject(array, position);
    }