Search in sources :

Example 41 with QualifiedObjectName

use of com.facebook.presto.common.QualifiedObjectName in project presto by prestodb.

the class DropColumnTask method execute.

@Override
public ListenableFuture<?> execute(DropColumn statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, Session session, List<Expression> parameters, WarningCollector warningCollector) {
    QualifiedObjectName tableName = createQualifiedObjectName(session, statement, statement.getTable());
    Optional<TableHandle> tableHandleOptional = metadata.getTableHandle(session, tableName);
    if (!tableHandleOptional.isPresent()) {
        if (!statement.isTableExists()) {
            throw new SemanticException(MISSING_TABLE, statement, "Table '%s' does not exist", tableName);
        }
        return immediateFuture(null);
    }
    Optional<ConnectorMaterializedViewDefinition> optionalMaterializedView = metadata.getMaterializedView(session, tableName);
    if (optionalMaterializedView.isPresent()) {
        if (!statement.isTableExists()) {
            throw new SemanticException(NOT_SUPPORTED, statement, "'%s' is a materialized view, and drop column is not supported", tableName);
        }
        return immediateFuture(null);
    }
    TableHandle tableHandle = tableHandleOptional.get();
    String column = statement.getColumn().getValue().toLowerCase(ENGLISH);
    accessControl.checkCanDropColumn(session.getRequiredTransactionId(), session.getIdentity(), session.getAccessControlContext(), tableName);
    ColumnHandle columnHandle = metadata.getColumnHandles(session, tableHandle).get(column);
    if (columnHandle == null) {
        if (!statement.isColumnExists()) {
            throw new SemanticException(MISSING_COLUMN, statement, "Column '%s' does not exist", column);
        }
        return immediateFuture(null);
    }
    if (metadata.getColumnMetadata(session, tableHandle, columnHandle).isHidden()) {
        throw new SemanticException(NOT_SUPPORTED, statement, "Cannot drop hidden column");
    }
    if (metadata.getTableMetadata(session, tableHandle).getColumns().stream().filter(info -> !info.isHidden()).count() <= 1) {
        throw new SemanticException(NOT_SUPPORTED, statement, "Cannot drop the only column in a table");
    }
    metadata.dropColumn(session, tableHandle, columnHandle);
    return immediateFuture(null);
}
Also used : ColumnHandle(com.facebook.presto.spi.ColumnHandle) ConnectorMaterializedViewDefinition(com.facebook.presto.spi.ConnectorMaterializedViewDefinition) TableHandle(com.facebook.presto.spi.TableHandle) MetadataUtil.createQualifiedObjectName(com.facebook.presto.metadata.MetadataUtil.createQualifiedObjectName) QualifiedObjectName(com.facebook.presto.common.QualifiedObjectName) SemanticException(com.facebook.presto.sql.analyzer.SemanticException)

Example 42 with QualifiedObjectName

use of com.facebook.presto.common.QualifiedObjectName in project presto by prestodb.

the class DropViewTask method execute.

@Override
public ListenableFuture<?> execute(DropView statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, Session session, List<Expression> parameters, WarningCollector warningCollector) {
    QualifiedObjectName name = createQualifiedObjectName(session, statement, statement.getName());
    Optional<ViewDefinition> view = metadata.getView(session, name);
    if (!view.isPresent()) {
        if (!statement.isExists()) {
            throw new SemanticException(MISSING_TABLE, statement, "View '%s' does not exist", name);
        }
        return immediateFuture(null);
    }
    accessControl.checkCanDropView(session.getRequiredTransactionId(), session.getIdentity(), session.getAccessControlContext(), name);
    metadata.dropView(session, name);
    return immediateFuture(null);
}
Also used : ViewDefinition(com.facebook.presto.metadata.ViewDefinition) MetadataUtil.createQualifiedObjectName(com.facebook.presto.metadata.MetadataUtil.createQualifiedObjectName) QualifiedObjectName(com.facebook.presto.common.QualifiedObjectName) SemanticException(com.facebook.presto.sql.analyzer.SemanticException)

Example 43 with QualifiedObjectName

use of com.facebook.presto.common.QualifiedObjectName in project presto by prestodb.

the class DropTableTask method execute.

@Override
public ListenableFuture<?> execute(DropTable statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, Session session, List<Expression> parameters, WarningCollector warningCollector) {
    QualifiedObjectName tableName = createQualifiedObjectName(session, statement, statement.getTableName());
    Optional<TableHandle> tableHandle = metadata.getTableHandle(session, tableName);
    if (!tableHandle.isPresent()) {
        if (!statement.isExists()) {
            throw new SemanticException(MISSING_TABLE, statement, "Table '%s' does not exist", tableName);
        }
        return immediateFuture(null);
    }
    Optional<ConnectorMaterializedViewDefinition> optionalMaterializedView = metadata.getMaterializedView(session, tableName);
    if (optionalMaterializedView.isPresent()) {
        if (!statement.isExists()) {
            throw new SemanticException(NOT_SUPPORTED, statement, "'%s' is a materialized view, not a table. Use DROP MATERIALIZED VIEW to drop.", tableName);
        }
        return immediateFuture(null);
    }
    accessControl.checkCanDropTable(session.getRequiredTransactionId(), session.getIdentity(), session.getAccessControlContext(), tableName);
    metadata.dropTable(session, tableHandle.get());
    return immediateFuture(null);
}
Also used : ConnectorMaterializedViewDefinition(com.facebook.presto.spi.ConnectorMaterializedViewDefinition) TableHandle(com.facebook.presto.spi.TableHandle) MetadataUtil.createQualifiedObjectName(com.facebook.presto.metadata.MetadataUtil.createQualifiedObjectName) QualifiedObjectName(com.facebook.presto.common.QualifiedObjectName) SemanticException(com.facebook.presto.sql.analyzer.SemanticException)

Example 44 with QualifiedObjectName

use of com.facebook.presto.common.QualifiedObjectName in project presto by prestodb.

the class Analysis method buildMaterializedViewAccessControl.

/**
 * For a query on materialized view, only check the actual required access controls for its base tables. For the materialized view,
 * will not check access control by replacing with AllowAllAccessControl.
 */
private Map<AccessControlInfo, Map<QualifiedObjectName, Set<String>>> buildMaterializedViewAccessControl(Map<AccessControlInfo, Map<QualifiedObjectName, Set<String>>> tableColumnReferences) {
    if (!(getStatement() instanceof Query) || materializedViews.isEmpty()) {
        return tableColumnReferences;
    }
    Map<AccessControlInfo, Map<QualifiedObjectName, Set<String>>> newTableColumnReferences = new LinkedHashMap<>();
    tableColumnReferences.forEach((accessControlInfo, references) -> {
        AccessControlInfo allowAllAccessControlInfo = new AccessControlInfo(new AllowAllAccessControl(), accessControlInfo.getIdentity());
        Map<QualifiedObjectName, Set<String>> newAllowAllReferences = newTableColumnReferences.getOrDefault(allowAllAccessControlInfo, new LinkedHashMap<>());
        Map<QualifiedObjectName, Set<String>> newOtherReferences = new LinkedHashMap<>();
        references.forEach((table, columns) -> {
            if (materializedViews.containsKey(table)) {
                newAllowAllReferences.computeIfAbsent(table, key -> new HashSet<>()).addAll(columns);
            } else {
                newOtherReferences.put(table, columns);
            }
        });
        if (!newAllowAllReferences.isEmpty()) {
            newTableColumnReferences.put(allowAllAccessControlInfo, newAllowAllReferences);
        }
        if (!newOtherReferences.isEmpty()) {
            newTableColumnReferences.put(accessControlInfo, newOtherReferences);
        }
    });
    return newTableColumnReferences;
}
Also used : ArrayListMultimap(com.google.common.collect.ArrayListMultimap) SubqueryExpression(com.facebook.presto.sql.tree.SubqueryExpression) Collections.unmodifiableList(java.util.Collections.unmodifiableList) ListMultimap(com.google.common.collect.ListMultimap) Collections.unmodifiableCollection(java.util.Collections.unmodifiableCollection) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) Join(com.facebook.presto.sql.tree.Join) Map(java.util.Map) QualifiedObjectName(com.facebook.presto.common.QualifiedObjectName) FunctionCall(com.facebook.presto.sql.tree.FunctionCall) Query(com.facebook.presto.sql.tree.Query) QuerySpecification(com.facebook.presto.sql.tree.QuerySpecification) ImmutableMap(com.google.common.collect.ImmutableMap) NOT_VISITED(com.facebook.presto.sql.analyzer.Analysis.MaterializedViewAnalysisState.NOT_VISITED) Collections.emptyList(java.util.Collections.emptyList) Collection(java.util.Collection) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) Node(com.facebook.presto.sql.tree.Node) Set(java.util.Set) String.format(java.lang.String.format) SampledRelation(com.facebook.presto.sql.tree.SampledRelation) Preconditions.checkState(com.google.common.base.Preconditions.checkState) Objects(java.util.Objects) List(java.util.List) InPredicate(com.facebook.presto.sql.tree.InPredicate) Optional(java.util.Optional) AllowAllAccessControl(com.facebook.presto.security.AllowAllAccessControl) SystemSessionProperties.isCheckAccessControlOnUtilizedColumnsOnly(com.facebook.presto.SystemSessionProperties.isCheckAccessControlOnUtilizedColumnsOnly) LambdaArgumentDeclaration(com.facebook.presto.sql.tree.LambdaArgumentDeclaration) Table(com.facebook.presto.sql.tree.Table) VISITING(com.facebook.presto.sql.analyzer.Analysis.MaterializedViewAnalysisState.VISITING) QuantifiedComparisonExpression(com.facebook.presto.sql.tree.QuantifiedComparisonExpression) Multimaps.forMap(com.google.common.collect.Multimaps.forMap) HashMap(java.util.HashMap) Multimap(com.google.common.collect.Multimap) Deque(java.util.Deque) Identifier(com.facebook.presto.sql.tree.Identifier) HashSet(java.util.HashSet) LinkedHashMap(java.util.LinkedHashMap) VISITED(com.facebook.presto.sql.analyzer.Analysis.MaterializedViewAnalysisState.VISITED) ImmutableList(com.google.common.collect.ImmutableList) Identity(com.facebook.presto.spi.security.Identity) Objects.requireNonNull(java.util.Objects.requireNonNull) TableHandle(com.facebook.presto.spi.TableHandle) Type(com.facebook.presto.common.type.Type) Nullable(javax.annotation.Nullable) LinkedHashSet(java.util.LinkedHashSet) ExistsPredicate(com.facebook.presto.sql.tree.ExistsPredicate) GroupingOperation(com.facebook.presto.sql.tree.GroupingOperation) OrderBy(com.facebook.presto.sql.tree.OrderBy) Relation(com.facebook.presto.sql.tree.Relation) Session(com.facebook.presto.Session) Multimaps.unmodifiableMultimap(com.google.common.collect.Multimaps.unmodifiableMultimap) Offset(com.facebook.presto.sql.tree.Offset) NodeRef(com.facebook.presto.sql.tree.NodeRef) Collections.unmodifiableSet(java.util.Collections.unmodifiableSet) Expression(com.facebook.presto.sql.tree.Expression) ColumnHandle(com.facebook.presto.spi.ColumnHandle) FunctionHandle(com.facebook.presto.spi.function.FunctionHandle) Collections.unmodifiableMap(java.util.Collections.unmodifiableMap) ArrayDeque(java.util.ArrayDeque) Immutable(javax.annotation.concurrent.Immutable) AccessControl(com.facebook.presto.security.AccessControl) Statement(com.facebook.presto.sql.tree.Statement) Set(java.util.Set) HashSet(java.util.HashSet) LinkedHashSet(java.util.LinkedHashSet) Collections.unmodifiableSet(java.util.Collections.unmodifiableSet) Query(com.facebook.presto.sql.tree.Query) QualifiedObjectName(com.facebook.presto.common.QualifiedObjectName) LinkedHashMap(java.util.LinkedHashMap) AllowAllAccessControl(com.facebook.presto.security.AllowAllAccessControl) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap) Multimaps.forMap(com.google.common.collect.Multimaps.forMap) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Collections.unmodifiableMap(java.util.Collections.unmodifiableMap) HashSet(java.util.HashSet) LinkedHashSet(java.util.LinkedHashSet)

Example 45 with QualifiedObjectName

use of com.facebook.presto.common.QualifiedObjectName in project presto by prestodb.

the class MaterializedViewQueryOptimizer method visitQuerySpecification.

@Override
protected Node visitQuerySpecification(QuerySpecification node, Void context) {
    if (!node.getFrom().isPresent()) {
        throw new IllegalStateException("Query with no From clause is not rewritable by materialized view");
    }
    Relation relation = node.getFrom().get();
    if (relation instanceof AliasedRelation) {
        removablePrefix = Optional.of(((AliasedRelation) relation).getAlias());
        relation = ((AliasedRelation) relation).getRelation();
    }
    if (!(relation instanceof Table)) {
        throw new SemanticException(NOT_SUPPORTED, node, "Relation other than Table is not supported in query optimizer");
    }
    Table baseTable = (Table) relation;
    if (!removablePrefix.isPresent()) {
        removablePrefix = Optional.of(new Identifier(baseTable.getName().toString()));
    }
    if (node.getGroupBy().isPresent()) {
        ImmutableSet.Builder<Expression> expressionsInGroupByBuilder = ImmutableSet.builder();
        for (GroupingElement element : node.getGroupBy().get().getGroupingElements()) {
            element = removeGroupingElementPrefix(element, removablePrefix);
            Optional<Set<Expression>> groupByOfMaterializedView = materializedViewInfo.getGroupBy();
            if (groupByOfMaterializedView.isPresent()) {
                for (Expression expression : element.getExpressions()) {
                    if (!groupByOfMaterializedView.get().contains(expression) || !materializedViewInfo.getBaseToViewColumnMap().containsKey(expression)) {
                        throw new IllegalStateException(format("Grouping element %s is not present in materialized view groupBy field", element));
                    }
                }
            }
            expressionsInGroupByBuilder.addAll(element.getExpressions());
        }
        expressionsInGroupBy = Optional.of(expressionsInGroupByBuilder.build());
    }
    // TODO: Add HAVING validation to the validator https://github.com/prestodb/presto/issues/16406
    if (node.getHaving().isPresent()) {
        throw new SemanticException(NOT_SUPPORTED, node, "Having clause is not supported in query optimizer");
    }
    if (materializedViewInfo.getWhereClause().isPresent()) {
        if (!node.getWhere().isPresent()) {
            throw new IllegalStateException("Query with no where clause is not rewritable by materialized view with where clause");
        }
        QualifiedObjectName baseTableName = createQualifiedObjectName(session, baseTable, baseTable.getName());
        Optional<TableHandle> tableHandle = metadata.getTableHandle(session, baseTableName);
        if (!tableHandle.isPresent()) {
            throw new SemanticException(MISSING_TABLE, node, "Table does not exist");
        }
        ImmutableList.Builder<Field> fields = ImmutableList.builder();
        for (ColumnHandle columnHandle : metadata.getColumnHandles(session, tableHandle.get()).values()) {
            ColumnMetadata columnMetadata = metadata.getColumnMetadata(session, tableHandle.get(), columnHandle);
            fields.add(Field.newUnqualified(materializedViewInfo.getWhereClause().get().getLocation(), columnMetadata.getName(), columnMetadata.getType()));
        }
        Scope scope = Scope.builder().withRelationType(RelationId.anonymous(), new RelationType(fields.build())).build();
        // Given base query's filter condition and materialized view's filter condition, the goal is to check if MV's filters contain Base's filters (Base implies MV).
        // Let base query's filter condition be A, and MV's filter condition be B.
        // One way to evaluate A implies B is to evaluate logical expression A^~B and check if the output domain is none.
        // If the resulting domain is none, then A^~B is false. Thus A implies B.
        // For more information and examples: https://fb.quip.com/WwmxA40jLMxR
        // TODO: Implement method that utilizes external SAT solver libraries. https://github.com/prestodb/presto/issues/16536
        RowExpression materializedViewWhereCondition = convertToRowExpression(materializedViewInfo.getWhereClause().get(), scope);
        RowExpression baseQueryWhereCondition = convertToRowExpression(node.getWhere().get(), scope);
        RowExpression rewriteLogicExpression = and(baseQueryWhereCondition, call(baseQueryWhereCondition.getSourceLocation(), "not", new FunctionResolution(metadata.getFunctionAndTypeManager()).notFunction(), materializedViewWhereCondition.getType(), materializedViewWhereCondition));
        RowExpression disjunctiveNormalForm = logicalRowExpressions.convertToDisjunctiveNormalForm(rewriteLogicExpression);
        ExtractionResult<VariableReferenceExpression> result = domainTranslator.fromPredicate(session.toConnectorSession(), disjunctiveNormalForm, BASIC_COLUMN_EXTRACTOR);
        if (!result.getTupleDomain().equals(TupleDomain.none())) {
            throw new IllegalStateException("View filter condition does not contain base query's filter condition");
        }
    }
    return new QuerySpecification((Select) process(node.getSelect(), context), node.getFrom().map(from -> (Relation) process(from, context)), node.getWhere().map(where -> (Expression) process(where, context)), node.getGroupBy().map(groupBy -> (GroupBy) process(groupBy, context)), node.getHaving().map(having -> (Expression) process(having, context)), node.getOrderBy().map(orderBy -> (OrderBy) process(orderBy, context)), node.getOffset(), node.getLimit());
}
Also used : FunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager) WarningCollector(com.facebook.presto.spi.WarningCollector) RowExpressionDomainTranslator(com.facebook.presto.sql.relational.RowExpressionDomainTranslator) AliasedRelation(com.facebook.presto.sql.tree.AliasedRelation) SqlToRowExpressionTranslator(com.facebook.presto.sql.relational.SqlToRowExpressionTranslator) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) ExpressionUtils.removeExpressionPrefix(com.facebook.presto.sql.ExpressionUtils.removeExpressionPrefix) SelectItem(com.facebook.presto.sql.tree.SelectItem) QualifiedObjectName(com.facebook.presto.common.QualifiedObjectName) ExpressionUtils.removeGroupingElementPrefix(com.facebook.presto.sql.ExpressionUtils.removeGroupingElementPrefix) FunctionCall(com.facebook.presto.sql.tree.FunctionCall) ImmutableSet(com.google.common.collect.ImmutableSet) Query(com.facebook.presto.sql.tree.Query) QueryBody(com.facebook.presto.sql.tree.QueryBody) QuerySpecification(com.facebook.presto.sql.tree.QuerySpecification) ImmutableMap(com.google.common.collect.ImmutableMap) Node(com.facebook.presto.sql.tree.Node) Set(java.util.Set) NOT_SUPPORTED(com.facebook.presto.sql.analyzer.SemanticErrorCode.NOT_SUPPORTED) GroupingElement(com.facebook.presto.sql.tree.GroupingElement) SortItem(com.facebook.presto.sql.tree.SortItem) String.format(java.lang.String.format) SqlParser(com.facebook.presto.sql.parser.SqlParser) LogicalBinaryExpression(com.facebook.presto.sql.tree.LogicalBinaryExpression) ColumnMetadata(com.facebook.presto.spi.ColumnMetadata) Optional(java.util.Optional) ExpressionUtils.removeSortItemPrefix(com.facebook.presto.sql.ExpressionUtils.removeSortItemPrefix) Select(com.facebook.presto.sql.tree.Select) ExtractionResult(com.facebook.presto.spi.relation.DomainTranslator.ExtractionResult) QualifiedName(com.facebook.presto.sql.tree.QualifiedName) ExpressionUtils.removeSingleColumnPrefix(com.facebook.presto.sql.ExpressionUtils.removeSingleColumnPrefix) Logger(com.facebook.airlift.log.Logger) Table(com.facebook.presto.sql.tree.Table) RowExpressionDeterminismEvaluator(com.facebook.presto.sql.relational.RowExpressionDeterminismEvaluator) Expressions.call(com.facebook.presto.sql.relational.Expressions.call) SingleColumn(com.facebook.presto.sql.tree.SingleColumn) Identifier(com.facebook.presto.sql.tree.Identifier) ImmutableList(com.google.common.collect.ImmutableList) LogicalRowExpressions(com.facebook.presto.expressions.LogicalRowExpressions) BASIC_COLUMN_EXTRACTOR(com.facebook.presto.spi.relation.DomainTranslator.BASIC_COLUMN_EXTRACTOR) Objects.requireNonNull(java.util.Objects.requireNonNull) TableHandle(com.facebook.presto.spi.TableHandle) FunctionResolution(com.facebook.presto.sql.relational.FunctionResolution) AllColumns(com.facebook.presto.sql.tree.AllColumns) SimpleGroupBy(com.facebook.presto.sql.tree.SimpleGroupBy) MaterializedViewInfo(com.facebook.presto.sql.analyzer.MaterializedViewInformationExtractor.MaterializedViewInfo) RowExpression(com.facebook.presto.spi.relation.RowExpression) GroupBy(com.facebook.presto.sql.tree.GroupBy) OrderBy(com.facebook.presto.sql.tree.OrderBy) Relation(com.facebook.presto.sql.tree.Relation) MISSING_TABLE(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_TABLE) Session(com.facebook.presto.Session) LogicalRowExpressions.and(com.facebook.presto.expressions.LogicalRowExpressions.and) AstVisitor(com.facebook.presto.sql.tree.AstVisitor) ComparisonExpression(com.facebook.presto.sql.tree.ComparisonExpression) TupleDomain(com.facebook.presto.common.predicate.TupleDomain) Expression(com.facebook.presto.sql.tree.Expression) ColumnHandle(com.facebook.presto.spi.ColumnHandle) MetadataUtil.createQualifiedObjectName(com.facebook.presto.metadata.MetadataUtil.createQualifiedObjectName) ArithmeticBinaryExpression(com.facebook.presto.sql.tree.ArithmeticBinaryExpression) Metadata(com.facebook.presto.metadata.Metadata) AccessControl(com.facebook.presto.security.AccessControl) ColumnMetadata(com.facebook.presto.spi.ColumnMetadata) ImmutableSet(com.google.common.collect.ImmutableSet) Set(java.util.Set) ImmutableList(com.google.common.collect.ImmutableList) FunctionResolution(com.facebook.presto.sql.relational.FunctionResolution) QuerySpecification(com.facebook.presto.sql.tree.QuerySpecification) AliasedRelation(com.facebook.presto.sql.tree.AliasedRelation) Relation(com.facebook.presto.sql.tree.Relation) Identifier(com.facebook.presto.sql.tree.Identifier) ImmutableSet(com.google.common.collect.ImmutableSet) OrderBy(com.facebook.presto.sql.tree.OrderBy) ColumnHandle(com.facebook.presto.spi.ColumnHandle) Table(com.facebook.presto.sql.tree.Table) SimpleGroupBy(com.facebook.presto.sql.tree.SimpleGroupBy) GroupBy(com.facebook.presto.sql.tree.GroupBy) RowExpression(com.facebook.presto.spi.relation.RowExpression) QualifiedObjectName(com.facebook.presto.common.QualifiedObjectName) MetadataUtil.createQualifiedObjectName(com.facebook.presto.metadata.MetadataUtil.createQualifiedObjectName) GroupingElement(com.facebook.presto.sql.tree.GroupingElement) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) LogicalBinaryExpression(com.facebook.presto.sql.tree.LogicalBinaryExpression) RowExpression(com.facebook.presto.spi.relation.RowExpression) ComparisonExpression(com.facebook.presto.sql.tree.ComparisonExpression) Expression(com.facebook.presto.sql.tree.Expression) ArithmeticBinaryExpression(com.facebook.presto.sql.tree.ArithmeticBinaryExpression) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) TableHandle(com.facebook.presto.spi.TableHandle) AliasedRelation(com.facebook.presto.sql.tree.AliasedRelation)

Aggregations

QualifiedObjectName (com.facebook.presto.common.QualifiedObjectName)59 TableHandle (com.facebook.presto.spi.TableHandle)20 Metadata (com.facebook.presto.metadata.Metadata)15 Session (com.facebook.presto.Session)14 MetadataUtil.createQualifiedObjectName (com.facebook.presto.metadata.MetadataUtil.createQualifiedObjectName)14 List (java.util.List)13 SemanticException (com.facebook.presto.sql.analyzer.SemanticException)12 ConnectorId (com.facebook.presto.spi.ConnectorId)11 ImmutableList.toImmutableList (com.google.common.collect.ImmutableList.toImmutableList)11 Map (java.util.Map)11 Objects.requireNonNull (java.util.Objects.requireNonNull)11 Optional (java.util.Optional)11 ColumnMetadata (com.facebook.presto.spi.ColumnMetadata)10 TransactionManager (com.facebook.presto.transaction.TransactionManager)10 Type (com.facebook.presto.common.type.Type)9 ColumnHandle (com.facebook.presto.spi.ColumnHandle)9 PrestoException (com.facebook.presto.spi.PrestoException)9 WarningCollector (com.facebook.presto.spi.WarningCollector)9 Expression (com.facebook.presto.sql.tree.Expression)9 ImmutableList (com.google.common.collect.ImmutableList)9