Search in sources :

Example 1 with ColumnMetadata

use of com.datastax.oss.driver.api.core.metadata.schema.ColumnMetadata in project calcite by apache.

the class CassandraSchema method getRelDataType.

RelProtoDataType getRelDataType(String columnFamily, boolean view) {
    Map<CqlIdentifier, ColumnMetadata> columns;
    CqlIdentifier tableName = CqlIdentifier.fromInternal(columnFamily);
    if (view) {
        Optional<ViewMetadata> optionalViewMetadata = getKeyspace().getView(tableName);
        if (optionalViewMetadata.isPresent()) {
            columns = optionalViewMetadata.get().getColumns();
        } else {
            throw new IllegalStateException("Unknown view " + tableName + " in keyspace " + keyspace);
        }
    } else {
        Optional<TableMetadata> optionalTableMetadata = getKeyspace().getTable(tableName);
        if (optionalTableMetadata.isPresent()) {
            columns = optionalTableMetadata.get().getColumns();
        } else {
            throw new IllegalStateException("Unknown table " + tableName + " in keyspace " + keyspace);
        }
    }
    // Temporary type factory, just for the duration of this method. Allowable
    // because we're creating a proto-type, not a type; before being used, the
    // proto-type will be copied into a real type factory.
    final RelDataTypeFactory typeFactory = new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
    final RelDataTypeFactory.Builder fieldInfo = typeFactory.builder();
    for (ColumnMetadata column : columns.values()) {
        final DataType dataType = column.getType();
        final String columnName = column.getName().asInternal();
        if (dataType instanceof ListType) {
            SqlTypeName arrayInnerType = CQL_TO_SQL_TYPE.lookup(((ListType) dataType).getElementType());
            fieldInfo.add(columnName, typeFactory.createArrayType(typeFactory.createSqlType(arrayInnerType), -1)).nullable(true);
        } else if (dataType instanceof SetType) {
            SqlTypeName multiSetInnerType = CQL_TO_SQL_TYPE.lookup(((SetType) dataType).getElementType());
            fieldInfo.add(columnName, typeFactory.createMultisetType(typeFactory.createSqlType(multiSetInnerType), -1)).nullable(true);
        } else if (dataType instanceof MapType) {
            MapType columnType = (MapType) dataType;
            SqlTypeName keyType = CQL_TO_SQL_TYPE.lookup(columnType.getKeyType());
            SqlTypeName valueType = CQL_TO_SQL_TYPE.lookup(columnType.getValueType());
            fieldInfo.add(columnName, typeFactory.createMapType(typeFactory.createSqlType(keyType), typeFactory.createSqlType(valueType))).nullable(true);
        } else if (dataType instanceof TupleType) {
            List<DataType> typeArgs = ((TupleType) dataType).getComponentTypes();
            List<Map.Entry<String, RelDataType>> typesList = IntStream.range(0, typeArgs.size()).mapToObj(i -> new Pair<>(// 1 indexed (as ARRAY)
            Integer.toString(i + 1), typeFactory.createSqlType(CQL_TO_SQL_TYPE.lookup(typeArgs.get(i))))).collect(Collectors.toList());
            fieldInfo.add(columnName, typeFactory.createStructType(typesList)).nullable(true);
        } else {
            SqlTypeName typeName = CQL_TO_SQL_TYPE.lookup(dataType);
            fieldInfo.add(columnName, typeName).nullable(true);
        }
    }
    return RelDataTypeImpl.proto(fieldInfo.build());
}
Also used : TableMetadata(com.datastax.oss.driver.api.core.metadata.schema.TableMetadata) ColumnMetadata(com.datastax.oss.driver.api.core.metadata.schema.ColumnMetadata) SqlTypeName(org.apache.calcite.sql.type.SqlTypeName) RelDataType(org.apache.calcite.rel.type.RelDataType) CqlIdentifier(com.datastax.oss.driver.api.core.CqlIdentifier) MapType(com.datastax.oss.driver.api.core.type.MapType) SqlTypeFactoryImpl(org.apache.calcite.sql.type.SqlTypeFactoryImpl) SetType(com.datastax.oss.driver.api.core.type.SetType) ListType(com.datastax.oss.driver.api.core.type.ListType) RelDataTypeFactory(org.apache.calcite.rel.type.RelDataTypeFactory) TupleType(com.datastax.oss.driver.api.core.type.TupleType) RelDataType(org.apache.calcite.rel.type.RelDataType) DataType(com.datastax.oss.driver.api.core.type.DataType) RelProtoDataType(org.apache.calcite.rel.type.RelProtoDataType) ArrayList(java.util.ArrayList) List(java.util.List) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap) ViewMetadata(com.datastax.oss.driver.api.core.metadata.schema.ViewMetadata)

Example 2 with ColumnMetadata

use of com.datastax.oss.driver.api.core.metadata.schema.ColumnMetadata in project java-driver by datastax.

the class TableParserTest method checkTable.

// Shared between 2.2 and 3.0 tests, all expected values are the same except the 'caching' option
private void checkTable(TableMetadata table) {
    assertThat(table.getKeyspace().asInternal()).isEqualTo("ks");
    assertThat(table.getName().asInternal()).isEqualTo("foo");
    assertThat(table.getPartitionKey()).hasSize(2);
    ColumnMetadata pk0 = table.getPartitionKey().get(0);
    assertThat(pk0.getName().asInternal()).isEqualTo("k1");
    assertThat(pk0.getType()).isEqualTo(DataTypes.INT);
    ColumnMetadata pk1 = table.getPartitionKey().get(1);
    assertThat(pk1.getName().asInternal()).isEqualTo("k2");
    assertThat(pk1.getType()).isEqualTo(DataTypes.TEXT);
    assertThat(table.getClusteringColumns().entrySet()).hasSize(2);
    Iterator<ColumnMetadata> clusteringColumnsIterator = table.getClusteringColumns().keySet().iterator();
    ColumnMetadata clusteringColumn1 = clusteringColumnsIterator.next();
    assertThat(clusteringColumn1.getName().asInternal()).isEqualTo("cc1");
    ColumnMetadata clusteringColumn2 = clusteringColumnsIterator.next();
    assertThat(clusteringColumn2.getName().asInternal()).isEqualTo("cc2");
    assertThat(table.getClusteringColumns().values()).containsExactly(ClusteringOrder.ASC, ClusteringOrder.DESC);
    assertThat(table.getColumns()).containsOnlyKeys(CqlIdentifier.fromInternal("k1"), CqlIdentifier.fromInternal("k2"), CqlIdentifier.fromInternal("cc1"), CqlIdentifier.fromInternal("cc2"), CqlIdentifier.fromInternal("v"));
    ColumnMetadata regularColumn = table.getColumns().get(CqlIdentifier.fromInternal("v"));
    assertThat(regularColumn.getName().asInternal()).isEqualTo("v");
    assertThat(regularColumn.getType()).isEqualTo(DataTypes.INT);
    assertThat(table.getIndexes()).containsOnlyKeys(CqlIdentifier.fromInternal("foo_v_idx"));
    IndexMetadata index = table.getIndexes().get(CqlIdentifier.fromInternal("foo_v_idx"));
    assertThat(index.getKeyspace().asInternal()).isEqualTo("ks");
    assertThat(index.getTable().asInternal()).isEqualTo("foo");
    assertThat(index.getName().asInternal()).isEqualTo("foo_v_idx");
    assertThat(index.getClassName()).isNotPresent();
    assertThat(index.getKind()).isEqualTo(IndexKind.COMPOSITES);
    assertThat(index.getTarget()).isEqualTo("v");
    assertThat(table.getIndex("foo_v_idx")).hasValue(index);
    @SuppressWarnings("unchecked") Map<String, String> compaction = (Map<String, String>) table.getOptions().get(CqlIdentifier.fromInternal("compaction"));
    assertThat(compaction).hasSize(2).containsEntry("class", "org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy").containsEntry("mock_option", "1");
}
Also used : ColumnMetadata(com.datastax.oss.driver.api.core.metadata.schema.ColumnMetadata) IndexMetadata(com.datastax.oss.driver.api.core.metadata.schema.IndexMetadata) ImmutableMap(com.datastax.oss.driver.shaded.guava.common.collect.ImmutableMap) Map(java.util.Map)

Example 3 with ColumnMetadata

use of com.datastax.oss.driver.api.core.metadata.schema.ColumnMetadata in project java-driver by datastax.

the class ViewParserTest method should_parse_view.

@Test
public void should_parse_view() {
    SchemaRows rows = rows(VIEW_ROW_3_0, COLUMN_ROWS_3_0);
    ViewParser parser = new ViewParser(rows, context);
    ViewMetadata view = parser.parseView(VIEW_ROW_3_0, KEYSPACE_ID, Collections.emptyMap());
    assertThat(view.getKeyspace().asInternal()).isEqualTo("ks");
    assertThat(view.getName().asInternal()).isEqualTo("alltimehigh");
    assertThat(view.getBaseTable().asInternal()).isEqualTo("scores");
    assertThat(view.getPartitionKey()).hasSize(1);
    ColumnMetadata pk0 = view.getPartitionKey().get(0);
    assertThat(pk0.getName().asInternal()).isEqualTo("game");
    assertThat(pk0.getType()).isEqualTo(DataTypes.TEXT);
    assertThat(view.getClusteringColumns().entrySet()).hasSize(5);
    Iterator<ColumnMetadata> clusteringColumnsIterator = view.getClusteringColumns().keySet().iterator();
    assertThat(clusteringColumnsIterator.next().getName().asInternal()).isEqualTo("score");
    assertThat(clusteringColumnsIterator.next().getName().asInternal()).isEqualTo("user");
    assertThat(clusteringColumnsIterator.next().getName().asInternal()).isEqualTo("year");
    assertThat(clusteringColumnsIterator.next().getName().asInternal()).isEqualTo("month");
    assertThat(clusteringColumnsIterator.next().getName().asInternal()).isEqualTo("day");
    assertThat(view.getColumns()).containsOnlyKeys(CqlIdentifier.fromInternal("game"), CqlIdentifier.fromInternal("score"), CqlIdentifier.fromInternal("user"), CqlIdentifier.fromInternal("year"), CqlIdentifier.fromInternal("month"), CqlIdentifier.fromInternal("day"));
}
Also used : ColumnMetadata(com.datastax.oss.driver.api.core.metadata.schema.ColumnMetadata) CassandraSchemaRows(com.datastax.oss.driver.internal.core.metadata.schema.queries.CassandraSchemaRows) SchemaRows(com.datastax.oss.driver.internal.core.metadata.schema.queries.SchemaRows) ViewMetadata(com.datastax.oss.driver.api.core.metadata.schema.ViewMetadata) Test(org.junit.Test)

Example 4 with ColumnMetadata

use of com.datastax.oss.driver.api.core.metadata.schema.ColumnMetadata in project java-driver by datastax.

the class DseTableParser method parseTable.

public DseTableMetadata parseTable(AdminRow tableRow, CqlIdentifier keyspaceId, Map<CqlIdentifier, UserDefinedType> userTypes, Multimap<CqlIdentifier, AdminRow> vertices, Multimap<CqlIdentifier, AdminRow> edges) {
    // Cassandra <= 2.2:
    // CREATE TABLE system.schema_columnfamilies (
    // keyspace_name text,
    // columnfamily_name text,
    // bloom_filter_fp_chance double,
    // caching text,
    // cf_id uuid,
    // column_aliases text, (2.1 only)
    // comment text,
    // compaction_strategy_class text,
    // compaction_strategy_options text,
    // comparator text,
    // compression_parameters text,
    // default_time_to_live int,
    // default_validator text,
    // dropped_columns map<text, bigint>,
    // gc_grace_seconds int,
    // index_interval int,
    // is_dense boolean, (2.1 only)
    // key_aliases text, (2.1 only)
    // key_validator text,
    // local_read_repair_chance double,
    // max_compaction_threshold int,
    // max_index_interval int,
    // memtable_flush_period_in_ms int,
    // min_compaction_threshold int,
    // min_index_interval int,
    // read_repair_chance double,
    // speculative_retry text,
    // subcomparator text,
    // type text,
    // value_alias text, (2.1 only)
    // PRIMARY KEY (keyspace_name, columnfamily_name)
    // ) WITH CLUSTERING ORDER BY (columnfamily_name ASC)
    // 
    // Cassandra 3.0:
    // CREATE TABLE system_schema.tables (
    // keyspace_name text,
    // table_name text,
    // bloom_filter_fp_chance double,
    // caching frozen<map<text, text>>,
    // cdc boolean,
    // comment text,
    // compaction frozen<map<text, text>>,
    // compression frozen<map<text, text>>,
    // crc_check_chance double,
    // dclocal_read_repair_chance double,
    // default_time_to_live int,
    // extensions frozen<map<text, blob>>,
    // flags frozen<set<text>>,
    // gc_grace_seconds int,
    // id uuid,
    // max_index_interval int,
    // memtable_flush_period_in_ms int,
    // min_index_interval int,
    // read_repair_chance double,
    // speculative_retry text,
    // PRIMARY KEY (keyspace_name, table_name)
    // ) WITH CLUSTERING ORDER BY (table_name ASC)
    CqlIdentifier tableId = CqlIdentifier.fromInternal(tableRow.getString(tableRow.contains("table_name") ? "table_name" : "columnfamily_name"));
    UUID uuid = tableRow.contains("id") ? tableRow.getUuid("id") : tableRow.getUuid("cf_id");
    List<RawColumn> rawColumns = RawColumn.toRawColumns(rows.columns().getOrDefault(keyspaceId, ImmutableMultimap.of()).get(tableId));
    if (rawColumns.isEmpty()) {
        LOG.warn("[{}] Processing TABLE refresh for {}.{} but found no matching rows, skipping", logPrefix, keyspaceId, tableId);
        return null;
    }
    boolean isCompactStorage;
    if (tableRow.contains("flags")) {
        Set<String> flags = tableRow.getSetOfString("flags");
        boolean isDense = flags.contains("dense");
        boolean isSuper = flags.contains("super");
        boolean isCompound = flags.contains("compound");
        isCompactStorage = isSuper || isDense || !isCompound;
        boolean isStaticCompact = !isSuper && !isDense && !isCompound;
        if (isStaticCompact) {
            RawColumn.pruneStaticCompactTableColumns(rawColumns);
        } else if (isDense) {
            RawColumn.pruneDenseTableColumnsV3(rawColumns);
        }
    } else {
        boolean isDense = tableRow.getBoolean("is_dense");
        if (isDense) {
            RawColumn.pruneDenseTableColumnsV2(rawColumns);
        }
        DataTypeClassNameCompositeParser.ParseResult comparator = new DataTypeClassNameCompositeParser().parseWithComposite(tableRow.getString("comparator"), keyspaceId, userTypes, context);
        isCompactStorage = isDense || !comparator.isComposite;
    }
    Collections.sort(rawColumns);
    ImmutableMap.Builder<CqlIdentifier, ColumnMetadata> allColumnsBuilder = ImmutableMap.builder();
    ImmutableList.Builder<ColumnMetadata> partitionKeyBuilder = ImmutableList.builder();
    ImmutableMap.Builder<ColumnMetadata, ClusteringOrder> clusteringColumnsBuilder = ImmutableMap.builder();
    ImmutableMap.Builder<CqlIdentifier, IndexMetadata> indexesBuilder = ImmutableMap.builder();
    for (RawColumn raw : rawColumns) {
        DataType dataType = rows.dataTypeParser().parse(keyspaceId, raw.dataType, userTypes, context);
        DseColumnMetadata column = new DefaultDseColumnMetadata(keyspaceId, tableId, raw.name, dataType, raw.kind.equals(RawColumn.KIND_STATIC));
        switch(raw.kind) {
            case RawColumn.KIND_PARTITION_KEY:
                partitionKeyBuilder.add(column);
                break;
            case RawColumn.KIND_CLUSTERING_COLUMN:
                clusteringColumnsBuilder.put(column, raw.reversed ? ClusteringOrder.DESC : ClusteringOrder.ASC);
                break;
            default:
        }
        allColumnsBuilder.put(column.getName(), column);
        DseIndexMetadata index = buildLegacyIndex(raw, column);
        if (index != null) {
            indexesBuilder.put(index.getName(), index);
        }
    }
    Map<CqlIdentifier, Object> options;
    try {
        options = parseOptions(tableRow);
    } catch (Exception e) {
        // Options change the most often, so be especially lenient if anything goes wrong.
        Loggers.warnWithException(LOG, "[{}] Error while parsing options for {}.{}, getOptions() will be empty", logPrefix, keyspaceId, tableId, e);
        options = Collections.emptyMap();
    }
    Collection<AdminRow> indexRows = rows.indexes().getOrDefault(keyspaceId, ImmutableMultimap.of()).get(tableId);
    for (AdminRow indexRow : indexRows) {
        DseIndexMetadata index = buildModernIndex(keyspaceId, tableId, indexRow);
        indexesBuilder.put(index.getName(), index);
    }
    return new DefaultDseTableMetadata(keyspaceId, tableId, uuid, isCompactStorage, false, partitionKeyBuilder.build(), clusteringColumnsBuilder.build(), allColumnsBuilder.build(), options, indexesBuilder.build(), buildVertex(tableId, vertices), buildEdge(tableId, edges, vertices));
}
Also used : DefaultDseColumnMetadata(com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseColumnMetadata) ColumnMetadata(com.datastax.oss.driver.api.core.metadata.schema.ColumnMetadata) DseColumnMetadata(com.datastax.dse.driver.api.core.metadata.schema.DseColumnMetadata) ImmutableList(com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList) DseIndexMetadata(com.datastax.dse.driver.api.core.metadata.schema.DseIndexMetadata) DefaultDseIndexMetadata(com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseIndexMetadata) DefaultDseTableMetadata(com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseTableMetadata) RawColumn(com.datastax.oss.driver.internal.core.metadata.schema.parsing.RawColumn) DataType(com.datastax.oss.driver.api.core.type.DataType) UUID(java.util.UUID) IndexMetadata(com.datastax.oss.driver.api.core.metadata.schema.IndexMetadata) DseIndexMetadata(com.datastax.dse.driver.api.core.metadata.schema.DseIndexMetadata) DefaultDseIndexMetadata(com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseIndexMetadata) DefaultDseColumnMetadata(com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseColumnMetadata) DseColumnMetadata(com.datastax.dse.driver.api.core.metadata.schema.DseColumnMetadata) DataTypeClassNameCompositeParser(com.datastax.oss.driver.internal.core.metadata.schema.parsing.DataTypeClassNameCompositeParser) CqlIdentifier(com.datastax.oss.driver.api.core.CqlIdentifier) ImmutableMap(com.datastax.oss.driver.shaded.guava.common.collect.ImmutableMap) DefaultDseColumnMetadata(com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseColumnMetadata) ClusteringOrder(com.datastax.oss.driver.api.core.metadata.schema.ClusteringOrder) AdminRow(com.datastax.oss.driver.internal.core.adminrequest.AdminRow)

Example 5 with ColumnMetadata

use of com.datastax.oss.driver.api.core.metadata.schema.ColumnMetadata in project java-driver by datastax.

the class DseTableParser method parseVirtualTable.

DseTableMetadata parseVirtualTable(AdminRow tableRow, CqlIdentifier keyspaceId) {
    CqlIdentifier tableId = CqlIdentifier.fromInternal(tableRow.getString("table_name"));
    List<RawColumn> rawColumns = RawColumn.toRawColumns(rows.virtualColumns().getOrDefault(keyspaceId, ImmutableMultimap.of()).get(tableId));
    if (rawColumns.isEmpty()) {
        LOG.warn("[{}] Processing TABLE refresh for {}.{} but found no matching rows, skipping", logPrefix, keyspaceId, tableId);
        return null;
    }
    Collections.sort(rawColumns);
    ImmutableMap.Builder<CqlIdentifier, ColumnMetadata> allColumnsBuilder = ImmutableMap.builder();
    ImmutableList.Builder<ColumnMetadata> partitionKeyBuilder = ImmutableList.builder();
    ImmutableMap.Builder<ColumnMetadata, ClusteringOrder> clusteringColumnsBuilder = ImmutableMap.builder();
    for (RawColumn raw : rawColumns) {
        DataType dataType = rows.dataTypeParser().parse(keyspaceId, raw.dataType, Collections.emptyMap(), context);
        DseColumnMetadata column = new DefaultDseColumnMetadata(keyspaceId, tableId, raw.name, dataType, raw.kind.equals(RawColumn.KIND_STATIC));
        switch(raw.kind) {
            case RawColumn.KIND_PARTITION_KEY:
                partitionKeyBuilder.add(column);
                break;
            case RawColumn.KIND_CLUSTERING_COLUMN:
                clusteringColumnsBuilder.put(column, raw.reversed ? ClusteringOrder.DESC : ClusteringOrder.ASC);
                break;
            default:
        }
        allColumnsBuilder.put(column.getName(), column);
    }
    return new DefaultDseTableMetadata(keyspaceId, tableId, null, false, true, partitionKeyBuilder.build(), clusteringColumnsBuilder.build(), allColumnsBuilder.build(), Collections.emptyMap(), Collections.emptyMap(), null, null);
}
Also used : DefaultDseColumnMetadata(com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseColumnMetadata) ColumnMetadata(com.datastax.oss.driver.api.core.metadata.schema.ColumnMetadata) DseColumnMetadata(com.datastax.dse.driver.api.core.metadata.schema.DseColumnMetadata) DefaultDseColumnMetadata(com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseColumnMetadata) DseColumnMetadata(com.datastax.dse.driver.api.core.metadata.schema.DseColumnMetadata) ImmutableList(com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList) DefaultDseTableMetadata(com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseTableMetadata) CqlIdentifier(com.datastax.oss.driver.api.core.CqlIdentifier) ImmutableMap(com.datastax.oss.driver.shaded.guava.common.collect.ImmutableMap) DefaultDseColumnMetadata(com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseColumnMetadata) RawColumn(com.datastax.oss.driver.internal.core.metadata.schema.parsing.RawColumn) DataType(com.datastax.oss.driver.api.core.type.DataType) ClusteringOrder(com.datastax.oss.driver.api.core.metadata.schema.ClusteringOrder)

Aggregations

ColumnMetadata (com.datastax.oss.driver.api.core.metadata.schema.ColumnMetadata)15 CqlIdentifier (com.datastax.oss.driver.api.core.CqlIdentifier)11 ClusteringOrder (com.datastax.oss.driver.api.core.metadata.schema.ClusteringOrder)8 DataType (com.datastax.oss.driver.api.core.type.DataType)8 ImmutableList (com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList)7 ImmutableMap (com.datastax.oss.driver.shaded.guava.common.collect.ImmutableMap)7 Map (java.util.Map)4 UUID (java.util.UUID)4 DseColumnMetadata (com.datastax.dse.driver.api.core.metadata.schema.DseColumnMetadata)3 DefaultDseColumnMetadata (com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseColumnMetadata)3 IndexMetadata (com.datastax.oss.driver.api.core.metadata.schema.IndexMetadata)3 TableMetadata (com.datastax.oss.driver.api.core.metadata.schema.TableMetadata)3 DefaultColumnMetadata (com.datastax.oss.driver.internal.core.metadata.schema.DefaultColumnMetadata)3 RawColumn (com.datastax.oss.driver.internal.core.metadata.schema.parsing.RawColumn)3 Test (org.junit.Test)3 DefaultDseTableMetadata (com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseTableMetadata)2 CqlSession (com.datastax.oss.driver.api.core.CqlSession)2 KeyspaceMetadata (com.datastax.oss.driver.api.core.metadata.schema.KeyspaceMetadata)2 ViewMetadata (com.datastax.oss.driver.api.core.metadata.schema.ViewMetadata)2 SetType (com.datastax.oss.driver.api.core.type.SetType)2