public PrestoSqlTableOptions()

in paimon-prestosql-common/src/main/java/org/apache/paimon/prestosql/PrestoSqlTableOptions.java [41:83]


    public PrestoSqlTableOptions() {
        ImmutableList.Builder<PropertyMetadata<?>> builder = ImmutableList.builder();
        List<PrestoSqlTableOptionUtils.OptionInfo> optionInfos =
                PrestoSqlTableOptionUtils.getOptionInfos();
        optionInfos.forEach(
                item -> {
                    if (item.isEnum) {
                        builder.add(
                                enumProperty(
                                        item.prestosqlOptionKey,
                                        "option",
                                        item.clazz,
                                        null,
                                        false));
                    } else {
                        builder.add(stringProperty(item.prestosqlOptionKey, "option", null, false));
                    }
                });

        builder.add(
                new PropertyMetadata<>(
                        PRIMARY_KEY_IDENTIFIER,
                        "Primary keys for the table.",
                        new ArrayType(VARCHAR),
                        List.class,
                        ImmutableList.of(),
                        false,
                        value -> (List<?>) value,
                        value -> value));

        builder.add(
                new PropertyMetadata<>(
                        PARTITIONED_BY_PROPERTY,
                        "Partition keys for the table.",
                        new ArrayType(VARCHAR),
                        List.class,
                        ImmutableList.of(),
                        false,
                        value -> (List<?>) value,
                        value -> value));

        tableProperties = builder.build();
    }