Search in sources :

Example 1 with ConnectorSession

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

the class InternalMetadataProvider method getRelationMetadata.

@Override
public Optional<ConnectorTableSchema> getRelationMetadata(ConnectorSession connectorSession, CatalogSchemaTableName tableName) {
    Session session = ((FullConnectorSession) connectorSession).getSession();
    QualifiedObjectName qualifiedName = new QualifiedObjectName(tableName.getCatalogName(), tableName.getSchemaTableName().getSchemaName(), tableName.getSchemaTableName().getTableName());
    Optional<MaterializedViewDefinition> materializedView = metadataManager.getMaterializedView(session, qualifiedName);
    if (materializedView.isPresent()) {
        return Optional.of(new ConnectorTableSchema(tableName.getSchemaTableName(), toColumnSchema(materializedView.get().getColumns())));
    }
    Optional<ViewDefinition> view = metadataManager.getView(session, qualifiedName);
    if (view.isPresent()) {
        return Optional.of(new ConnectorTableSchema(tableName.getSchemaTableName(), toColumnSchema(view.get().getColumns())));
    }
    Optional<TableHandle> tableHandle = metadataManager.getTableHandle(session, qualifiedName);
    if (tableHandle.isPresent()) {
        return Optional.of(metadataManager.getTableSchema(session, tableHandle.get()).getTableSchema());
    }
    return Optional.empty();
}
Also used : MaterializedViewDefinition(io.trino.metadata.MaterializedViewDefinition) ConnectorTableSchema(io.trino.spi.connector.ConnectorTableSchema) ViewDefinition(io.trino.metadata.ViewDefinition) MaterializedViewDefinition(io.trino.metadata.MaterializedViewDefinition) TableHandle(io.trino.metadata.TableHandle) QualifiedObjectName(io.trino.metadata.QualifiedObjectName) FullConnectorSession(io.trino.FullConnectorSession) ConnectorSession(io.trino.spi.connector.ConnectorSession) Session(io.trino.Session) FullConnectorSession(io.trino.FullConnectorSession)

Example 2 with ConnectorSession

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

the class InformationSchemaMetadata method calculateRoles.

private Optional<Set<String>> calculateRoles(ConnectorSession connectorSession, TupleDomain<ColumnHandle> constraint, Optional<Predicate<Map<ColumnHandle, NullableValue>>> predicate) {
    if (constraint.isNone()) {
        return Optional.empty();
    }
    Optional<Set<String>> roles = filterString(constraint, ROLE_NAME_COLUMN_HANDLE);
    if (roles.isPresent()) {
        Set<String> result = roles.get().stream().filter(this::isLowerCase).filter(role -> predicate.isEmpty() || predicate.get().test(roleAsFixedValues(role))).collect(toImmutableSet());
        if (result.isEmpty()) {
            return Optional.empty();
        }
        if (result.size() <= MAX_ROLE_COUNT) {
            return Optional.of(result);
        }
    }
    if (predicate.isEmpty()) {
        return Optional.empty();
    }
    Session session = ((FullConnectorSession) connectorSession).getSession();
    return Optional.of(metadata.listRoles(session, Optional.of(catalogName)).stream().filter(role -> predicate.get().test(roleAsFixedValues(role))).collect(toImmutableSet()));
}
Also used : Arrays(java.util.Arrays) VIEWS(io.trino.connector.informationschema.InformationSchemaTable.VIEWS) TABLES(io.trino.connector.informationschema.InformationSchemaTable.TABLES) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) ConnectorTableHandle(io.trino.spi.connector.ConnectorTableHandle) Map(java.util.Map) Slices.utf8Slice(io.airlift.slice.Slices.utf8Slice) ENGLISH(java.util.Locale.ENGLISH) MetadataUtil.findColumnMetadata(io.trino.metadata.MetadataUtil.findColumnMetadata) TABLE_REDIRECTION_ERROR(io.trino.spi.StandardErrorCode.TABLE_REDIRECTION_ERROR) ImmutableSet(com.google.common.collect.ImmutableSet) ImmutableMap(com.google.common.collect.ImmutableMap) Range(io.trino.spi.predicate.Range) ROLE_AUTHORIZATION_DESCRIPTORS(io.trino.connector.informationschema.InformationSchemaTable.ROLE_AUTHORIZATION_DESCRIPTORS) Predicate(java.util.function.Predicate) Collections.emptyList(java.util.Collections.emptyList) Domain(io.trino.spi.predicate.Domain) EquatableValueSet(io.trino.spi.predicate.EquatableValueSet) Collection(java.util.Collection) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) Set(java.util.Set) TrinoException(io.trino.spi.TrinoException) LimitApplicationResult(io.trino.spi.connector.LimitApplicationResult) SchemaTableName(io.trino.spi.connector.SchemaTableName) List(java.util.List) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) Stream(java.util.stream.Stream) SchemaTablePrefix(io.trino.spi.connector.SchemaTablePrefix) Function.identity(java.util.function.Function.identity) Optional(java.util.Optional) INFORMATION_SCHEMA(io.trino.connector.informationschema.InformationSchemaTable.INFORMATION_SCHEMA) ConnectorMetadata(io.trino.spi.connector.ConnectorMetadata) Session(io.trino.Session) Constraint(io.trino.spi.connector.Constraint) Slice(io.airlift.slice.Slice) FullConnectorSession(io.trino.FullConnectorSession) NullableValue(io.trino.spi.predicate.NullableValue) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) TABLE_PRIVILEGES(io.trino.connector.informationschema.InformationSchemaTable.TABLE_PRIVILEGES) VarcharType.createUnboundedVarcharType(io.trino.spi.type.VarcharType.createUnboundedVarcharType) ConnectorTableMetadata(io.trino.spi.connector.ConnectorTableMetadata) OptionalLong(java.util.OptionalLong) ImmutableList(com.google.common.collect.ImmutableList) Verify.verify(com.google.common.base.Verify.verify) Objects.requireNonNull(java.util.Objects.requireNonNull) ColumnHandle(io.trino.spi.connector.ColumnHandle) ImmutableSet.toImmutableSet(com.google.common.collect.ImmutableSet.toImmutableSet) COLUMNS(io.trino.connector.informationschema.InformationSchemaTable.COLUMNS) QualifiedTablePrefix(io.trino.metadata.QualifiedTablePrefix) ConstraintApplicationResult(io.trino.spi.connector.ConstraintApplicationResult) ConnectorSession(io.trino.spi.connector.ConnectorSession) TupleDomain(io.trino.spi.predicate.TupleDomain) ConnectorTableProperties(io.trino.spi.connector.ConnectorTableProperties) QualifiedObjectName(io.trino.metadata.QualifiedObjectName) Metadata(io.trino.metadata.Metadata) SortedRangeSet(io.trino.spi.predicate.SortedRangeSet) ImmutableSet(com.google.common.collect.ImmutableSet) EquatableValueSet(io.trino.spi.predicate.EquatableValueSet) Set(java.util.Set) ImmutableSet.toImmutableSet(com.google.common.collect.ImmutableSet.toImmutableSet) SortedRangeSet(io.trino.spi.predicate.SortedRangeSet) Session(io.trino.Session) FullConnectorSession(io.trino.FullConnectorSession) ConnectorSession(io.trino.spi.connector.ConnectorSession) FullConnectorSession(io.trino.FullConnectorSession)

Example 3 with ConnectorSession

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

the class SystemTablesMetadata method listTableColumns.

@Override
public Map<SchemaTableName, List<ColumnMetadata>> listTableColumns(ConnectorSession session, SchemaTablePrefix prefix) {
    requireNonNull(prefix, "prefix is null");
    if (prefix.getTable().isPresent()) {
        // if table is concrete we just use tables.getSystemTable to support tables which are not listable
        SchemaTableName tableName = prefix.toSchemaTableName();
        return tables.getSystemTable(session, tableName).map(systemTable -> singletonMap(tableName, systemTable.getTableMetadata().getColumns())).orElseGet(ImmutableMap::of);
    }
    ImmutableMap.Builder<SchemaTableName, List<ColumnMetadata>> builder = ImmutableMap.builder();
    for (SystemTable table : tables.listSystemTables(session)) {
        ConnectorTableMetadata tableMetadata = table.getTableMetadata();
        if (prefix.matches(tableMetadata.getTable())) {
            builder.put(tableMetadata.getTable(), tableMetadata.getColumns());
        }
    }
    return builder.buildOrThrow();
}
Also used : Constraint(io.trino.spi.connector.Constraint) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) ConnectorTableMetadata(io.trino.spi.connector.ConnectorTableMetadata) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) SystemColumnHandle.toSystemColumnHandles(io.trino.connector.system.SystemColumnHandle.toSystemColumnHandles) ConnectorTableHandle(io.trino.spi.connector.ConnectorTableHandle) Map(java.util.Map) Objects.requireNonNull(java.util.Objects.requireNonNull) ColumnHandle(io.trino.spi.connector.ColumnHandle) Collections.singletonMap(java.util.Collections.singletonMap) JdbcTable(io.trino.connector.system.jdbc.JdbcTable) MetadataUtil.findColumnMetadata(io.trino.metadata.MetadataUtil.findColumnMetadata) NOT_FOUND(io.trino.spi.StandardErrorCode.NOT_FOUND) ConstraintApplicationResult(io.trino.spi.connector.ConstraintApplicationResult) ImmutableMap(com.google.common.collect.ImmutableMap) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) TrinoException(io.trino.spi.TrinoException) ConnectorSession(io.trino.spi.connector.ConnectorSession) TupleDomain(io.trino.spi.predicate.TupleDomain) Sets(com.google.common.collect.Sets) SchemaTableName(io.trino.spi.connector.SchemaTableName) String.format(java.lang.String.format) List(java.util.List) ConnectorTableProperties(io.trino.spi.connector.ConnectorTableProperties) SchemaTablePrefix(io.trino.spi.connector.SchemaTablePrefix) Optional(java.util.Optional) ConnectorMetadata(io.trino.spi.connector.ConnectorMetadata) SystemTable(io.trino.spi.connector.SystemTable) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) List(java.util.List) SystemTable(io.trino.spi.connector.SystemTable) SchemaTableName(io.trino.spi.connector.SchemaTableName) ImmutableMap(com.google.common.collect.ImmutableMap) ConnectorTableMetadata(io.trino.spi.connector.ConnectorTableMetadata)

Example 4 with ConnectorSession

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

the class RuleStatsSystemTable method pageSource.

@Override
public ConnectorPageSource pageSource(ConnectorTransactionHandle transactionHandle, ConnectorSession session, TupleDomain<Integer> constraint) {
    checkState(ruleStatsRecorder.isPresent(), "Rule stats system table can return results only on coordinator");
    Map<Class<?>, RuleStats> ruleStats = ruleStatsRecorder.get().getStats();
    int positionCount = ruleStats.size();
    Map<String, BlockBuilder> blockBuilders = ruleStatsTable.getColumns().stream().collect(toImmutableMap(ColumnMetadata::getName, column -> column.getType().createBlockBuilder(null, positionCount)));
    for (Map.Entry<Class<?>, RuleStats> entry : ruleStats.entrySet()) {
        RuleStats stats = entry.getValue();
        VARCHAR.writeString(blockBuilders.get("rule_name"), entry.getKey().getSimpleName());
        BIGINT.writeLong(blockBuilders.get("invocations"), stats.getInvocations());
        BIGINT.writeLong(blockBuilders.get("matches"), stats.getHits());
        BIGINT.writeLong(blockBuilders.get("failures"), stats.getFailures());
        DOUBLE.writeDouble(blockBuilders.get("average_time"), stats.getTime().getAvg());
        BlockBuilder mapWriter = blockBuilders.get("time_distribution_percentiles").beginBlockEntry();
        for (Map.Entry<Double, Double> percentile : stats.getTime().getPercentiles().entrySet()) {
            DOUBLE.writeDouble(mapWriter, percentile.getKey());
            DOUBLE.writeDouble(mapWriter, percentile.getValue());
        }
        blockBuilders.get("time_distribution_percentiles").closeEntry();
    }
    Block[] blocks = ruleStatsTable.getColumns().stream().map(column -> blockBuilders.get(column.getName()).build()).toArray(Block[]::new);
    return new FixedPageSource(ImmutableList.of(new Page(positionCount, blocks)));
}
Also used : TableMetadataBuilder.tableMetadataBuilder(io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) Page(io.trino.spi.Page) ConnectorTableMetadata(io.trino.spi.connector.ConnectorTableMetadata) RuleStatsRecorder(io.trino.sql.planner.RuleStatsRecorder) Inject(javax.inject.Inject) VARCHAR(io.trino.spi.type.VarcharType.VARCHAR) ImmutableList(com.google.common.collect.ImmutableList) Block(io.trino.spi.block.Block) Map(java.util.Map) Objects.requireNonNull(java.util.Objects.requireNonNull) ConnectorPageSource(io.trino.spi.connector.ConnectorPageSource) SINGLE_COORDINATOR(io.trino.spi.connector.SystemTable.Distribution.SINGLE_COORDINATOR) ConnectorSession(io.trino.spi.connector.ConnectorSession) TupleDomain(io.trino.spi.predicate.TupleDomain) SchemaTableName(io.trino.spi.connector.SchemaTableName) Preconditions.checkState(com.google.common.base.Preconditions.checkState) DOUBLE(io.trino.spi.type.DoubleType.DOUBLE) RuleStats(io.trino.sql.planner.iterative.RuleStats) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) FixedPageSource(io.trino.spi.connector.FixedPageSource) BIGINT(io.trino.spi.type.BigintType.BIGINT) Optional(java.util.Optional) BlockBuilder(io.trino.spi.block.BlockBuilder) TypeSignature.mapType(io.trino.spi.type.TypeSignature.mapType) TypeManager(io.trino.spi.type.TypeManager) SystemTable(io.trino.spi.connector.SystemTable) ConnectorTransactionHandle(io.trino.spi.connector.ConnectorTransactionHandle) Page(io.trino.spi.Page) FixedPageSource(io.trino.spi.connector.FixedPageSource) RuleStats(io.trino.sql.planner.iterative.RuleStats) Block(io.trino.spi.block.Block) Map(java.util.Map) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) BlockBuilder(io.trino.spi.block.BlockBuilder)

Example 5 with ConnectorSession

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

the class ColumnJdbcTable method applyFilter.

@Override
public TupleDomain<ColumnHandle> applyFilter(ConnectorSession connectorSession, Constraint constraint) {
    TupleDomain<ColumnHandle> tupleDomain = constraint.getSummary();
    if (tupleDomain.isNone() || constraint.predicate().isEmpty()) {
        return tupleDomain;
    }
    Predicate<Map<ColumnHandle, NullableValue>> predicate = constraint.predicate().get();
    Set<ColumnHandle> predicateColumns = constraint.getPredicateColumns().orElseThrow(() -> new VerifyException("columns not present for a predicate"));
    boolean hasSchemaPredicate = predicateColumns.contains(TABLE_SCHEMA_COLUMN);
    boolean hasTablePredicate = predicateColumns.contains(TABLE_NAME_COLUMN);
    if (!hasSchemaPredicate && !hasTablePredicate) {
        // No filter on schema name and table name at all.
        return tupleDomain;
    }
    Session session = ((FullConnectorSession) connectorSession).getSession();
    Optional<String> catalogFilter = tryGetSingleVarcharValue(tupleDomain, TABLE_CATALOG_COLUMN);
    Optional<String> schemaFilter = tryGetSingleVarcharValue(tupleDomain, TABLE_SCHEMA_COLUMN);
    Optional<String> tableFilter = tryGetSingleVarcharValue(tupleDomain, TABLE_NAME_COLUMN);
    if (schemaFilter.isPresent() && tableFilter.isPresent()) {
        // No need to narrow down the domain.
        return tupleDomain;
    }
    List<String> catalogs = listCatalogs(session, metadata, accessControl, catalogFilter).keySet().stream().filter(catalogName -> predicate.test(ImmutableMap.of(TABLE_CATALOG_COLUMN, toNullableValue(catalogName)))).collect(toImmutableList());
    List<CatalogSchemaName> schemas = catalogs.stream().flatMap(catalogName -> listSchemas(session, metadata, accessControl, catalogName, schemaFilter).stream().filter(schemaName -> !hasSchemaPredicate || predicate.test(ImmutableMap.of(TABLE_CATALOG_COLUMN, toNullableValue(catalogName), TABLE_SCHEMA_COLUMN, toNullableValue(schemaName)))).map(schemaName -> new CatalogSchemaName(catalogName, schemaName))).collect(toImmutableList());
    if (!hasTablePredicate) {
        return TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>builder().put(TABLE_CATALOG_COLUMN, schemas.stream().map(CatalogSchemaName::getCatalogName).collect(toVarcharDomain()).simplify(MAX_DOMAIN_SIZE)).put(TABLE_SCHEMA_COLUMN, schemas.stream().map(CatalogSchemaName::getSchemaName).collect(toVarcharDomain()).simplify(MAX_DOMAIN_SIZE)).buildOrThrow());
    }
    List<CatalogSchemaTableName> tables = schemas.stream().flatMap(schema -> {
        QualifiedTablePrefix tablePrefix = tableFilter.isPresent() ? new QualifiedTablePrefix(schema.getCatalogName(), schema.getSchemaName(), tableFilter.get()) : new QualifiedTablePrefix(schema.getCatalogName(), schema.getSchemaName());
        return listTables(session, metadata, accessControl, tablePrefix).stream().filter(schemaTableName -> predicate.test(ImmutableMap.of(TABLE_CATALOG_COLUMN, toNullableValue(schema.getCatalogName()), TABLE_SCHEMA_COLUMN, toNullableValue(schemaTableName.getSchemaName()), TABLE_NAME_COLUMN, toNullableValue(schemaTableName.getTableName())))).map(schemaTableName -> new CatalogSchemaTableName(schema.getCatalogName(), schemaTableName.getSchemaName(), schemaTableName.getTableName()));
    }).collect(toImmutableList());
    return TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>builder().put(TABLE_CATALOG_COLUMN, tables.stream().map(CatalogSchemaTableName::getCatalogName).collect(toVarcharDomain()).simplify(MAX_DOMAIN_SIZE)).put(TABLE_SCHEMA_COLUMN, tables.stream().map(catalogSchemaTableName -> catalogSchemaTableName.getSchemaTableName().getSchemaName()).collect(toVarcharDomain()).simplify(MAX_DOMAIN_SIZE)).put(TABLE_NAME_COLUMN, tables.stream().map(catalogSchemaTableName -> catalogSchemaTableName.getSchemaTableName().getTableName()).collect(toVarcharDomain()).simplify(MAX_DOMAIN_SIZE)).buildOrThrow());
}
Also used : FilterUtil.tryGetSingleVarcharValue(io.trino.connector.system.jdbc.FilterUtil.tryGetSingleVarcharValue) TableMetadataBuilder.tableMetadataBuilder(io.trino.metadata.MetadataUtil.TableMetadataBuilder.tableMetadataBuilder) TimestampWithTimeZoneType(io.trino.spi.type.TimestampWithTimeZoneType) Slices(io.airlift.slice.Slices) Map(java.util.Map) CatalogSchemaName(io.trino.spi.connector.CatalogSchemaName) Slices.utf8Slice(io.airlift.slice.Slices.utf8Slice) Collector(java.util.stream.Collector) INTEGER(io.trino.spi.type.IntegerType.INTEGER) ENGLISH(java.util.Locale.ENGLISH) SMALLINT(io.trino.spi.type.SmallintType.SMALLINT) MetadataListing.listCatalogs(io.trino.metadata.MetadataListing.listCatalogs) ImmutableMap(com.google.common.collect.ImmutableMap) TypeUtils.getDisplayLabel(io.trino.type.TypeUtils.getDisplayLabel) Predicate(java.util.function.Predicate) Domain(io.trino.spi.predicate.Domain) Collection(java.util.Collection) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) Set(java.util.Set) ArrayType(io.trino.spi.type.ArrayType) Math.min(java.lang.Math.min) Collectors(java.util.stream.Collectors) SchemaTableName(io.trino.spi.connector.SchemaTableName) ZoneId(java.time.ZoneId) List(java.util.List) AccessControl(io.trino.security.AccessControl) BIGINT(io.trino.spi.type.BigintType.BIGINT) CatalogSchemaTableName(io.trino.spi.connector.CatalogSchemaTableName) Entry(java.util.Map.Entry) Optional(java.util.Optional) DecimalType(io.trino.spi.type.DecimalType) DATE(io.trino.spi.type.DateType.DATE) REAL(io.trino.spi.type.RealType.REAL) Session(io.trino.Session) TimeWithTimeZoneType(io.trino.spi.type.TimeWithTimeZoneType) Types(java.sql.Types) Constraint(io.trino.spi.connector.Constraint) TimeType(io.trino.spi.type.TimeType) FullConnectorSession(io.trino.FullConnectorSession) NullableValue(io.trino.spi.predicate.NullableValue) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) Type(io.trino.spi.type.Type) BOOLEAN(io.trino.spi.type.BooleanType.BOOLEAN) VarcharType.createUnboundedVarcharType(io.trino.spi.type.VarcharType.createUnboundedVarcharType) ConnectorTableMetadata(io.trino.spi.connector.ConnectorTableMetadata) DatabaseMetaData(java.sql.DatabaseMetaData) TimestampType(io.trino.spi.type.TimestampType) Inject(javax.inject.Inject) VarcharType(io.trino.spi.type.VarcharType) Objects.requireNonNull(java.util.Objects.requireNonNull) ColumnHandle(io.trino.spi.connector.ColumnHandle) ImmutableSet.toImmutableSet(com.google.common.collect.ImmutableSet.toImmutableSet) VARBINARY(io.trino.spi.type.VarbinaryType.VARBINARY) QualifiedTablePrefix(io.trino.metadata.QualifiedTablePrefix) MetadataListing.listTables(io.trino.metadata.MetadataListing.listTables) VerifyException(com.google.common.base.VerifyException) MetadataListing.listSchemas(io.trino.metadata.MetadataListing.listSchemas) RecordCursor(io.trino.spi.connector.RecordCursor) MetadataListing.listTableColumns(io.trino.metadata.MetadataListing.listTableColumns) ConnectorSession(io.trino.spi.connector.ConnectorSession) TupleDomain(io.trino.spi.predicate.TupleDomain) InMemoryRecordSet(io.trino.spi.connector.InMemoryRecordSet) Builder(io.trino.spi.connector.InMemoryRecordSet.Builder) DOUBLE(io.trino.spi.type.DoubleType.DOUBLE) SystemColumnHandle(io.trino.connector.system.SystemColumnHandle) CharType(io.trino.spi.type.CharType) SystemSessionProperties.isOmitDateTimeTypePrecision(io.trino.SystemSessionProperties.isOmitDateTimeTypePrecision) Metadata(io.trino.metadata.Metadata) FilterUtil.tablePrefix(io.trino.connector.system.jdbc.FilterUtil.tablePrefix) TINYINT(io.trino.spi.type.TinyintType.TINYINT) ConnectorTransactionHandle(io.trino.spi.connector.ConnectorTransactionHandle) ColumnHandle(io.trino.spi.connector.ColumnHandle) SystemColumnHandle(io.trino.connector.system.SystemColumnHandle) CatalogSchemaTableName(io.trino.spi.connector.CatalogSchemaTableName) QualifiedTablePrefix(io.trino.metadata.QualifiedTablePrefix) VerifyException(com.google.common.base.VerifyException) CatalogSchemaName(io.trino.spi.connector.CatalogSchemaName) Domain(io.trino.spi.predicate.Domain) TupleDomain(io.trino.spi.predicate.TupleDomain) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap) Session(io.trino.Session) FullConnectorSession(io.trino.FullConnectorSession) ConnectorSession(io.trino.spi.connector.ConnectorSession) FullConnectorSession(io.trino.FullConnectorSession)

Aggregations

ConnectorSession (io.trino.spi.connector.ConnectorSession)252 SchemaTableName (io.trino.spi.connector.SchemaTableName)131 ConnectorMetadata (io.trino.spi.connector.ConnectorMetadata)122 ConnectorTableHandle (io.trino.spi.connector.ConnectorTableHandle)119 List (java.util.List)111 ColumnHandle (io.trino.spi.connector.ColumnHandle)108 Optional (java.util.Optional)107 ImmutableList (com.google.common.collect.ImmutableList)98 Objects.requireNonNull (java.util.Objects.requireNonNull)97 TrinoException (io.trino.spi.TrinoException)94 ImmutableList.toImmutableList (com.google.common.collect.ImmutableList.toImmutableList)92 Map (java.util.Map)88 TestingConnectorSession (io.trino.testing.TestingConnectorSession)87 ImmutableMap (com.google.common.collect.ImmutableMap)85 TupleDomain (io.trino.spi.predicate.TupleDomain)85 ConnectorTableMetadata (io.trino.spi.connector.ConnectorTableMetadata)83 Test (org.testng.annotations.Test)82 ColumnMetadata (io.trino.spi.connector.ColumnMetadata)80 Constraint (io.trino.spi.connector.Constraint)76 Type (io.trino.spi.type.Type)72