presto-main/src/main/java/io/prestosql/operator/scalar/ArrayUnionFunction.java/ArrayUnionFunction/appendTypedArray
class ArrayUnionFunction:    private static void appendTypedArray(Block array, Type type, TypedSet typedSet, BlockBuilder blockBuilder)
    {
        for (int i = 0; i < array.getPositionCount(); i++) {
            if (!typedSet.contains(array, i)) {
                typedSet.add(array, i);
                type.appendTo(array, i, blockBuilder);
            }
        }
    }