Search in sources :

Example 1 with InMemoryRecordSet

use of io.trino.spi.connector.InMemoryRecordSet in project trino by trinodb.

the class PropertiesSystemTableProvider method getSystemTable.

@Override
public Optional<SystemTable> getSystemTable(HiveMetadata metadata, ConnectorSession session, SchemaTableName tableName) {
    if (!PROPERTIES.matches(tableName)) {
        return Optional.empty();
    }
    SchemaTableName sourceTableName = PROPERTIES.getSourceTableName(tableName);
    Table table = metadata.getMetastore().getTable(sourceTableName.getSchemaName(), sourceTableName.getTableName()).orElseThrow(() -> new TableNotFoundException(tableName));
    if (isDeltaLakeTable(table) || isIcebergTable(table)) {
        return Optional.empty();
    }
    Map<String, String> sortedTableParameters = ImmutableSortedMap.copyOf(table.getParameters());
    List<ColumnMetadata> columns = sortedTableParameters.keySet().stream().map(key -> new ColumnMetadata(key, VarcharType.VARCHAR)).collect(toImmutableList());
    List<Type> types = columns.stream().map(ColumnMetadata::getType).collect(toImmutableList());
    Iterable<List<Object>> propertyValues = ImmutableList.of(ImmutableList.copyOf(sortedTableParameters.values()));
    return Optional.of(createSystemTable(new ConnectorTableMetadata(sourceTableName, columns), constraint -> new InMemoryRecordSet(types, propertyValues).cursor()));
}
Also used : HiveUtil.isIcebergTable(io.trino.plugin.hive.util.HiveUtil.isIcebergTable) Table(io.trino.plugin.hive.metastore.Table) PROPERTIES(io.trino.plugin.hive.SystemTableHandler.PROPERTIES) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) HiveUtil.isDeltaLakeTable(io.trino.plugin.hive.util.HiveUtil.isDeltaLakeTable) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) Type(io.trino.spi.type.Type) ConnectorTableMetadata(io.trino.spi.connector.ConnectorTableMetadata) ConnectorSession(io.trino.spi.connector.ConnectorSession) InMemoryRecordSet(io.trino.spi.connector.InMemoryRecordSet) SchemaTableName(io.trino.spi.connector.SchemaTableName) VarcharType(io.trino.spi.type.VarcharType) List(java.util.List) TableNotFoundException(io.trino.spi.connector.TableNotFoundException) ImmutableList(com.google.common.collect.ImmutableList) Map(java.util.Map) Optional(java.util.Optional) SystemTables.createSystemTable(io.trino.plugin.hive.util.SystemTables.createSystemTable) ImmutableSortedMap(com.google.common.collect.ImmutableSortedMap) SystemTable(io.trino.spi.connector.SystemTable) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) HiveUtil.isIcebergTable(io.trino.plugin.hive.util.HiveUtil.isIcebergTable) Table(io.trino.plugin.hive.metastore.Table) HiveUtil.isDeltaLakeTable(io.trino.plugin.hive.util.HiveUtil.isDeltaLakeTable) SystemTables.createSystemTable(io.trino.plugin.hive.util.SystemTables.createSystemTable) SystemTable(io.trino.spi.connector.SystemTable) SchemaTableName(io.trino.spi.connector.SchemaTableName) InMemoryRecordSet(io.trino.spi.connector.InMemoryRecordSet) TableNotFoundException(io.trino.spi.connector.TableNotFoundException) Type(io.trino.spi.type.Type) VarcharType(io.trino.spi.type.VarcharType) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) List(java.util.List) ImmutableList(com.google.common.collect.ImmutableList) ConnectorTableMetadata(io.trino.spi.connector.ConnectorTableMetadata)

Example 2 with InMemoryRecordSet

use of io.trino.spi.connector.InMemoryRecordSet in project trino by trinodb.

the class TestFieldSetFilteringRecordSet method test.

@Test
public void test() {
    ArrayType arrayOfBigintType = new ArrayType(BIGINT);
    FieldSetFilteringRecordSet fieldSetFilteringRecordSet = new FieldSetFilteringRecordSet(new TypeOperators(), new InMemoryRecordSet(ImmutableList.of(BIGINT, BIGINT, TIMESTAMP_WITH_TIME_ZONE, TIMESTAMP_WITH_TIME_ZONE, arrayOfBigintType, arrayOfBigintType), ImmutableList.of(ImmutableList.of(100L, 100L, // test same time in different time zone to make sure equal check was done properly
    packDateTimeWithZone(100, getTimeZoneKeyForOffset(123)), packDateTimeWithZone(100, getTimeZoneKeyForOffset(234)), // test structural type
    arrayBlockOf(BIGINT, 12, 34, 56), arrayBlockOf(BIGINT, 12, 34, 56)))), ImmutableList.of(ImmutableSet.of(0, 1), ImmutableSet.of(2, 3), ImmutableSet.of(4, 5)));
    RecordCursor recordCursor = fieldSetFilteringRecordSet.cursor();
    assertTrue(recordCursor.advanceNextPosition());
}
Also used : ArrayType(io.trino.spi.type.ArrayType) RecordCursor(io.trino.spi.connector.RecordCursor) InMemoryRecordSet(io.trino.spi.connector.InMemoryRecordSet) TypeOperators(io.trino.spi.type.TypeOperators) Test(org.testng.annotations.Test)

Example 3 with InMemoryRecordSet

use of io.trino.spi.connector.InMemoryRecordSet in project trino by trinodb.

the class BigQueryMetadata method getViewDefinitionSystemTable.

private Optional<SystemTable> getViewDefinitionSystemTable(ConnectorSession session, SchemaTableName viewDefinitionTableName, SchemaTableName sourceTableName) {
    BigQueryClient client = bigQueryClientFactory.create(session);
    String projectId = getProjectId(client);
    String remoteSchemaName = client.toRemoteDataset(projectId, sourceTableName.getSchemaName()).map(RemoteDatabaseObject::getOnlyRemoteName).orElseThrow(() -> new TableNotFoundException(viewDefinitionTableName));
    String remoteTableName = client.toRemoteTable(projectId, remoteSchemaName, sourceTableName.getTableName()).map(RemoteDatabaseObject::getOnlyRemoteName).orElseThrow(() -> new TableNotFoundException(viewDefinitionTableName));
    TableInfo tableInfo = client.getTable(TableId.of(projectId, remoteSchemaName, remoteTableName)).orElseThrow(() -> new TableNotFoundException(viewDefinitionTableName));
    if (!(tableInfo.getDefinition() instanceof ViewDefinition)) {
        throw new TableNotFoundException(viewDefinitionTableName);
    }
    List<ColumnMetadata> columns = ImmutableList.of(new ColumnMetadata("query", VarcharType.VARCHAR));
    List<Type> types = columns.stream().map(ColumnMetadata::getType).collect(toImmutableList());
    Optional<String> query = Optional.ofNullable(((ViewDefinition) tableInfo.getDefinition()).getQuery());
    Iterable<List<Object>> propertyValues = ImmutableList.of(ImmutableList.of(query.orElse("NULL")));
    return Optional.of(createSystemTable(new ConnectorTableMetadata(sourceTableName, columns), constraint -> new InMemoryRecordSet(types, propertyValues).cursor()));
}
Also used : ViewDefinition(com.google.cloud.bigquery.ViewDefinition) StandardTableDefinition(com.google.cloud.bigquery.StandardTableDefinition) TableId(com.google.cloud.bigquery.TableId) SchemaNotFoundException(io.trino.spi.connector.SchemaNotFoundException) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) TableNotFoundException(io.trino.spi.connector.TableNotFoundException) VIEW(com.google.cloud.bigquery.TableDefinition.Type.VIEW) Schema(com.google.cloud.bigquery.Schema) ConnectorTableHandle(io.trino.spi.connector.ConnectorTableHandle) Map(java.util.Map) ProjectionApplicationResult(io.trino.spi.connector.ProjectionApplicationResult) RemoteDatabaseObject(io.trino.plugin.bigquery.BigQueryClient.RemoteDatabaseObject) ENGLISH(java.util.Locale.ENGLISH) TABLE(com.google.cloud.bigquery.TableDefinition.Type.TABLE) Field(com.google.cloud.bigquery.Field) TableDefinition(com.google.cloud.bigquery.TableDefinition) ImmutableSet(com.google.common.collect.ImmutableSet) ImmutableMap(com.google.common.collect.ImmutableMap) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) Set(java.util.Set) TrinoException(io.trino.spi.TrinoException) Streams(com.google.common.collect.Streams) SchemaTableName(io.trino.spi.connector.SchemaTableName) Preconditions.checkState(com.google.common.base.Preconditions.checkState) List(java.util.List) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) Stream(java.util.stream.Stream) BIGQUERY_LISTING_DATASET_ERROR(io.trino.plugin.bigquery.BigQueryErrorCode.BIGQUERY_LISTING_DATASET_ERROR) TrinoPrincipal(io.trino.spi.security.TrinoPrincipal) SchemaTablePrefix(io.trino.spi.connector.SchemaTablePrefix) Assignment(io.trino.spi.connector.Assignment) Function.identity(java.util.function.Function.identity) Optional(java.util.Optional) ConnectorMetadata(io.trino.spi.connector.ConnectorMetadata) SystemTable(io.trino.spi.connector.SystemTable) Constraint(io.trino.spi.connector.Constraint) Logger(io.airlift.log.Logger) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) Type(io.trino.spi.type.Type) BigQueryException(com.google.cloud.bigquery.BigQueryException) BigQueryType.toField(io.trino.plugin.bigquery.BigQueryType.toField) ConnectorTableMetadata(io.trino.spi.connector.ConnectorTableMetadata) DatasetId(com.google.cloud.bigquery.DatasetId) Function(java.util.function.Function) Inject(javax.inject.Inject) VarcharType(io.trino.spi.type.VarcharType) ImmutableList(com.google.common.collect.ImmutableList) Objects.requireNonNull(java.util.Objects.requireNonNull) ColumnHandle(io.trino.spi.connector.ColumnHandle) Table(com.google.cloud.bigquery.Table) ConstraintApplicationResult(io.trino.spi.connector.ConstraintApplicationResult) RecordCursor(io.trino.spi.connector.RecordCursor) ConnectorSession(io.trino.spi.connector.ConnectorSession) TupleDomain(io.trino.spi.predicate.TupleDomain) InMemoryRecordSet(io.trino.spi.connector.InMemoryRecordSet) ConnectorTableProperties(io.trino.spi.connector.ConnectorTableProperties) ConnectorExpression(io.trino.spi.expression.ConnectorExpression) DatasetInfo(com.google.cloud.bigquery.DatasetInfo) TableInfo(com.google.cloud.bigquery.TableInfo) ConnectorTransactionHandle(io.trino.spi.connector.ConnectorTransactionHandle) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) ViewDefinition(com.google.cloud.bigquery.ViewDefinition) InMemoryRecordSet(io.trino.spi.connector.InMemoryRecordSet) TableNotFoundException(io.trino.spi.connector.TableNotFoundException) Type(io.trino.spi.type.Type) VarcharType(io.trino.spi.type.VarcharType) TableInfo(com.google.cloud.bigquery.TableInfo) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) List(java.util.List) ImmutableList(com.google.common.collect.ImmutableList) ConnectorTableMetadata(io.trino.spi.connector.ConnectorTableMetadata)

Example 4 with InMemoryRecordSet

use of io.trino.spi.connector.InMemoryRecordSet in project trino by trinodb.

the class PartitionsSystemTableProvider method getSystemTable.

@Override
public Optional<SystemTable> getSystemTable(HiveMetadata metadata, ConnectorSession session, SchemaTableName tableName) {
    if (!PARTITIONS.matches(tableName)) {
        return Optional.empty();
    }
    SchemaTableName sourceTableName = PARTITIONS.getSourceTableName(tableName);
    Table sourceTable = metadata.getMetastore().getTable(sourceTableName.getSchemaName(), sourceTableName.getTableName()).orElse(null);
    if (sourceTable == null || isDeltaLakeTable(sourceTable) || isIcebergTable(sourceTable)) {
        return Optional.empty();
    }
    verifyOnline(sourceTableName, Optional.empty(), getProtectMode(sourceTable), sourceTable.getParameters());
    HiveTableHandle sourceTableHandle = new HiveTableHandle(sourceTableName.getSchemaName(), sourceTableName.getTableName(), sourceTable.getParameters(), getPartitionKeyColumnHandles(sourceTable, typeManager), getRegularColumnHandles(sourceTable, typeManager, getTimestampPrecision(session)), getHiveBucketHandle(session, sourceTable, typeManager));
    List<HiveColumnHandle> partitionColumns = sourceTableHandle.getPartitionColumns();
    if (partitionColumns.isEmpty()) {
        return Optional.empty();
    }
    List<Type> partitionColumnTypes = partitionColumns.stream().map(HiveColumnHandle::getType).collect(toImmutableList());
    List<ColumnMetadata> partitionSystemTableColumns = partitionColumns.stream().map(column -> ColumnMetadata.builder().setName(column.getName()).setType(column.getType()).setComment(column.getComment()).setHidden(column.isHidden()).build()).collect(toImmutableList());
    Map<Integer, HiveColumnHandle> fieldIdToColumnHandle = IntStream.range(0, partitionColumns.size()).boxed().collect(toImmutableMap(identity(), partitionColumns::get));
    return Optional.of(createSystemTable(new ConnectorTableMetadata(tableName, partitionSystemTableColumns), constraint -> {
        Constraint targetConstraint = new Constraint(constraint.transformKeys(fieldIdToColumnHandle::get));
        Iterable<List<Object>> records = () -> stream(partitionManager.getPartitions(metadata.getMetastore(), sourceTableHandle, targetConstraint).getPartitions()).map(hivePartition -> IntStream.range(0, partitionColumns.size()).mapToObj(fieldIdToColumnHandle::get).map(columnHandle -> hivePartition.getKeys().get(columnHandle).getValue()).collect(// nullable
        toList())).iterator();
        return new InMemoryRecordSet(partitionColumnTypes, records).cursor();
    }));
}
Also used : IntStream(java.util.stream.IntStream) Constraint(io.trino.spi.connector.Constraint) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) HiveUtil.isDeltaLakeTable(io.trino.plugin.hive.util.HiveUtil.isDeltaLakeTable) Type(io.trino.spi.type.Type) ConnectorTableMetadata(io.trino.spi.connector.ConnectorTableMetadata) Inject(javax.inject.Inject) Map(java.util.Map) Objects.requireNonNull(java.util.Objects.requireNonNull) PARTITIONS(io.trino.plugin.hive.SystemTableHandler.PARTITIONS) HiveUtil.isIcebergTable(io.trino.plugin.hive.util.HiveUtil.isIcebergTable) Table(io.trino.plugin.hive.metastore.Table) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) HiveUtil.getRegularColumnHandles(io.trino.plugin.hive.util.HiveUtil.getRegularColumnHandles) HiveSessionProperties.getTimestampPrecision(io.trino.plugin.hive.HiveSessionProperties.getTimestampPrecision) ConnectorSession(io.trino.spi.connector.ConnectorSession) InMemoryRecordSet(io.trino.spi.connector.InMemoryRecordSet) SchemaTableName(io.trino.spi.connector.SchemaTableName) Streams.stream(com.google.common.collect.Streams.stream) HiveBucketing.getHiveBucketHandle(io.trino.plugin.hive.util.HiveBucketing.getHiveBucketHandle) List(java.util.List) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) Collectors.toList(java.util.stream.Collectors.toList) MetastoreUtil.verifyOnline(io.trino.plugin.hive.metastore.MetastoreUtil.verifyOnline) MetastoreUtil.getProtectMode(io.trino.plugin.hive.metastore.MetastoreUtil.getProtectMode) Function.identity(java.util.function.Function.identity) Optional(java.util.Optional) SystemTables.createSystemTable(io.trino.plugin.hive.util.SystemTables.createSystemTable) HiveUtil.getPartitionKeyColumnHandles(io.trino.plugin.hive.util.HiveUtil.getPartitionKeyColumnHandles) TypeManager(io.trino.spi.type.TypeManager) SystemTable(io.trino.spi.connector.SystemTable) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) HiveUtil.isDeltaLakeTable(io.trino.plugin.hive.util.HiveUtil.isDeltaLakeTable) HiveUtil.isIcebergTable(io.trino.plugin.hive.util.HiveUtil.isIcebergTable) Table(io.trino.plugin.hive.metastore.Table) SystemTables.createSystemTable(io.trino.plugin.hive.util.SystemTables.createSystemTable) SystemTable(io.trino.spi.connector.SystemTable) Constraint(io.trino.spi.connector.Constraint) SchemaTableName(io.trino.spi.connector.SchemaTableName) InMemoryRecordSet(io.trino.spi.connector.InMemoryRecordSet) Type(io.trino.spi.type.Type) ConnectorTableMetadata(io.trino.spi.connector.ConnectorTableMetadata)

Example 5 with InMemoryRecordSet

use of io.trino.spi.connector.InMemoryRecordSet in project trino by trinodb.

the class PartitionTable method buildRecordCursor.

private RecordCursor buildRecordCursor(Map<StructLikeWrapper, IcebergStatistics> partitionStatistics, List<PartitionField> partitionFields) {
    List<Type> partitionTypes = partitionTypes(partitionFields);
    List<? extends Class<?>> partitionColumnClass = partitionTypes.stream().map(type -> type.typeId().javaClass()).collect(toImmutableList());
    ImmutableList.Builder<List<Object>> records = ImmutableList.builder();
    for (Map.Entry<StructLikeWrapper, IcebergStatistics> partitionEntry : partitionStatistics.entrySet()) {
        StructLikeWrapper partitionStruct = partitionEntry.getKey();
        IcebergStatistics icebergStatistics = partitionEntry.getValue();
        List<Object> row = new ArrayList<>();
        // add data for partition columns
        partitionColumnType.ifPresent(partitionColumnType -> {
            BlockBuilder partitionRowBlockBuilder = partitionColumnType.createBlockBuilder(null, 1);
            BlockBuilder partitionBlockBuilder = partitionRowBlockBuilder.beginBlockEntry();
            for (int i = 0; i < partitionColumnTypes.size(); i++) {
                io.trino.spi.type.Type trinoType = partitionColumnType.getFields().get(i).getType();
                Object value = convertIcebergValueToTrino(partitionTypes.get(i), partitionStruct.get().get(i, partitionColumnClass.get(i)));
                writeNativeValue(trinoType, partitionBlockBuilder, value);
            }
            partitionRowBlockBuilder.closeEntry();
            row.add(partitionColumnType.getObject(partitionRowBlockBuilder, 0));
        });
        // add the top level metrics.
        row.add(icebergStatistics.getRecordCount());
        row.add(icebergStatistics.getFileCount());
        row.add(icebergStatistics.getSize());
        // add column level metrics
        dataColumnType.ifPresent(dataColumnType -> {
            BlockBuilder dataRowBlockBuilder = dataColumnType.createBlockBuilder(null, 1);
            BlockBuilder dataBlockBuilder = dataRowBlockBuilder.beginBlockEntry();
            for (int i = 0; i < columnMetricTypes.size(); i++) {
                Integer fieldId = nonPartitionPrimitiveColumns.get(i).fieldId();
                Object min = icebergStatistics.getMinValues().get(fieldId);
                Object max = icebergStatistics.getMaxValues().get(fieldId);
                Long nullCount = icebergStatistics.getNullCounts().get(fieldId);
                if (min == null && max == null && nullCount == null) {
                    row.add(null);
                    return;
                }
                RowType columnMetricType = columnMetricTypes.get(i);
                columnMetricType.writeObject(dataBlockBuilder, getColumnMetricBlock(columnMetricType, min, max, nullCount));
            }
            dataRowBlockBuilder.closeEntry();
            row.add(dataColumnType.getObject(dataRowBlockBuilder, 0));
        });
        records.add(row);
    }
    return new InMemoryRecordSet(resultTypes, records.build()).cursor();
}
Also used : Types(org.apache.iceberg.types.Types) TypeConverter.toTrinoType(io.trino.plugin.iceberg.TypeConverter.toTrinoType) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) ConnectorTableMetadata(io.trino.spi.connector.ConnectorTableMetadata) HashMap(java.util.HashMap) StructLike(org.apache.iceberg.StructLike) PartitionField(org.apache.iceberg.PartitionField) ArrayList(java.util.ArrayList) IcebergTypes.convertIcebergValueToTrino(io.trino.plugin.iceberg.IcebergTypes.convertIcebergValueToTrino) ImmutableList(com.google.common.collect.ImmutableList) Block(io.trino.spi.block.Block) Map(java.util.Map) Objects.requireNonNull(java.util.Objects.requireNonNull) FileScanTask(org.apache.iceberg.FileScanTask) DataFile(org.apache.iceberg.DataFile) Collectors.toSet(java.util.stream.Collectors.toSet) RowType(io.trino.spi.type.RowType) RecordCursor(io.trino.spi.connector.RecordCursor) CloseableIterable(org.apache.iceberg.io.CloseableIterable) Table(org.apache.iceberg.Table) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) Set(java.util.Set) TableScan(org.apache.iceberg.TableScan) IOException(java.io.IOException) ConnectorSession(io.trino.spi.connector.ConnectorSession) TypeUtils.writeNativeValue(io.trino.spi.type.TypeUtils.writeNativeValue) TupleDomain(io.trino.spi.predicate.TupleDomain) Schema(org.apache.iceberg.Schema) InMemoryRecordSet(io.trino.spi.connector.InMemoryRecordSet) SchemaTableName(io.trino.spi.connector.SchemaTableName) Type(org.apache.iceberg.types.Type) UncheckedIOException(java.io.UncheckedIOException) List(java.util.List) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) IcebergUtil.getIdentityPartitions(io.trino.plugin.iceberg.IcebergUtil.getIdentityPartitions) Stream(java.util.stream.Stream) BIGINT(io.trino.spi.type.BigintType.BIGINT) Optional(java.util.Optional) IcebergUtil.primitiveFieldTypes(io.trino.plugin.iceberg.IcebergUtil.primitiveFieldTypes) StructLikeWrapper(org.apache.iceberg.util.StructLikeWrapper) BlockBuilder(io.trino.spi.block.BlockBuilder) TypeManager(io.trino.spi.type.TypeManager) SystemTable(io.trino.spi.connector.SystemTable) ConnectorTransactionHandle(io.trino.spi.connector.ConnectorTransactionHandle) ImmutableList(com.google.common.collect.ImmutableList) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) ArrayList(java.util.ArrayList) RowType(io.trino.spi.type.RowType) InMemoryRecordSet(io.trino.spi.connector.InMemoryRecordSet) TypeConverter.toTrinoType(io.trino.plugin.iceberg.TypeConverter.toTrinoType) RowType(io.trino.spi.type.RowType) Type(org.apache.iceberg.types.Type) StructLikeWrapper(org.apache.iceberg.util.StructLikeWrapper) ArrayList(java.util.ArrayList) ImmutableList(com.google.common.collect.ImmutableList) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) List(java.util.List) HashMap(java.util.HashMap) Map(java.util.Map) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) BlockBuilder(io.trino.spi.block.BlockBuilder)

Aggregations

InMemoryRecordSet (io.trino.spi.connector.InMemoryRecordSet)7 SchemaTableName (io.trino.spi.connector.SchemaTableName)6 ImmutableList.toImmutableList (com.google.common.collect.ImmutableList.toImmutableList)5 List (java.util.List)5 ImmutableList (com.google.common.collect.ImmutableList)4 ColumnMetadata (io.trino.spi.connector.ColumnMetadata)4 ConnectorSession (io.trino.spi.connector.ConnectorSession)4 ConnectorTableMetadata (io.trino.spi.connector.ConnectorTableMetadata)4 SystemTable (io.trino.spi.connector.SystemTable)4 Type (io.trino.spi.type.Type)4 Map (java.util.Map)4 Optional (java.util.Optional)4 ImmutableMap.toImmutableMap (com.google.common.collect.ImmutableMap.toImmutableMap)3 Block (io.trino.spi.block.Block)3 ArrayList (java.util.ArrayList)3 ImmutableMap (com.google.common.collect.ImmutableMap)2 TrinoThriftSchemaTableName (io.trino.plugin.thrift.api.TrinoThriftSchemaTableName)2 TrinoThriftInteger (io.trino.plugin.thrift.api.datatypes.TrinoThriftInteger)2 Page (io.trino.spi.Page)2 RecordCursor (io.trino.spi.connector.RecordCursor)2