Search in sources :

Example 1 with ColumnDefinition

use of com.facebook.presto.sql.tree.ColumnDefinition in project presto by prestodb.

the class AddColumnTask method execute.

@Override
public ListenableFuture<?> execute(AddColumn statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters) {
    Session session = stateMachine.getSession();
    QualifiedObjectName tableName = createQualifiedObjectName(session, statement, statement.getName());
    Optional<TableHandle> tableHandle = metadata.getTableHandle(session, tableName);
    if (!tableHandle.isPresent()) {
        throw new SemanticException(MISSING_TABLE, statement, "Table '%s' does not exist", tableName);
    }
    accessControl.checkCanAddColumns(session.getRequiredTransactionId(), session.getIdentity(), tableName);
    Map<String, ColumnHandle> columnHandles = metadata.getColumnHandles(session, tableHandle.get());
    ColumnDefinition element = statement.getColumn();
    Type type = metadata.getType(parseTypeSignature(element.getType()));
    if ((type == null) || type.equals(UNKNOWN)) {
        throw new SemanticException(TYPE_MISMATCH, element, "Unknown type for column '%s' ", element.getName());
    }
    if (columnHandles.containsKey(element.getName().toLowerCase(ENGLISH))) {
        throw new SemanticException(COLUMN_ALREADY_EXISTS, statement, "Column '%s' already exists", element.getName());
    }
    metadata.addColumn(session, tableHandle.get(), new ColumnMetadata(element.getName(), type));
    return immediateFuture(null);
}
Also used : ColumnHandle(com.facebook.presto.spi.ColumnHandle) Type(com.facebook.presto.spi.type.Type) ColumnMetadata(com.facebook.presto.spi.ColumnMetadata) TableHandle(com.facebook.presto.metadata.TableHandle) QualifiedObjectName(com.facebook.presto.metadata.QualifiedObjectName) MetadataUtil.createQualifiedObjectName(com.facebook.presto.metadata.MetadataUtil.createQualifiedObjectName) Session(com.facebook.presto.Session) SemanticException(com.facebook.presto.sql.analyzer.SemanticException) ColumnDefinition(com.facebook.presto.sql.tree.ColumnDefinition)

Example 2 with ColumnDefinition

use of com.facebook.presto.sql.tree.ColumnDefinition in project presto by prestodb.

the class CreateTableTask method execute.

@Override
public ListenableFuture<?> execute(CreateTable statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters) {
    checkArgument(!statement.getElements().isEmpty(), "no columns for table");
    Session session = stateMachine.getSession();
    QualifiedObjectName tableName = createQualifiedObjectName(session, statement, statement.getName());
    Optional<TableHandle> tableHandle = metadata.getTableHandle(session, tableName);
    if (tableHandle.isPresent()) {
        if (!statement.isNotExists()) {
            throw new SemanticException(TABLE_ALREADY_EXISTS, statement, "Table '%s' already exists", tableName);
        }
        return immediateFuture(null);
    }
    List<ColumnMetadata> columns = new ArrayList<>();
    Map<String, Object> inheritedProperties = ImmutableMap.of();
    boolean includingProperties = false;
    for (TableElement element : statement.getElements()) {
        if (element instanceof ColumnDefinition) {
            ColumnDefinition column = (ColumnDefinition) element;
            Type type = metadata.getType(parseTypeSignature(column.getType()));
            if ((type == null) || type.equals(UNKNOWN)) {
                throw new SemanticException(TYPE_MISMATCH, column, "Unknown type for column '%s' ", column.getName());
            }
            columns.add(new ColumnMetadata(column.getName(), type, column.getComment().orElse(null), false));
        } else if (element instanceof LikeClause) {
            LikeClause likeClause = (LikeClause) element;
            QualifiedObjectName likeTableName = createQualifiedObjectName(session, statement, likeClause.getTableName());
            if (!metadata.getCatalogHandle(session, likeTableName.getCatalogName()).isPresent()) {
                throw new SemanticException(MISSING_CATALOG, statement, "LIKE table catalog '%s' does not exist", likeTableName.getCatalogName());
            }
            if (!tableName.getCatalogName().equals(likeTableName.getCatalogName())) {
                throw new SemanticException(NOT_SUPPORTED, statement, "LIKE table across catalogs is not supported");
            }
            TableHandle likeTable = metadata.getTableHandle(session, likeTableName).orElseThrow(() -> new SemanticException(MISSING_TABLE, statement, "LIKE table '%s' does not exist", likeTableName));
            TableMetadata likeTableMetadata = metadata.getTableMetadata(session, likeTable);
            Optional<LikeClause.PropertiesOption> propertiesOption = likeClause.getPropertiesOption();
            if (propertiesOption.isPresent() && propertiesOption.get().equals(LikeClause.PropertiesOption.INCLUDING)) {
                if (includingProperties) {
                    throw new SemanticException(NOT_SUPPORTED, statement, "Only one LIKE clause can specify INCLUDING PROPERTIES");
                }
                includingProperties = true;
                inheritedProperties = likeTableMetadata.getMetadata().getProperties();
            }
            likeTableMetadata.getColumns().stream().filter(column -> !column.isHidden()).forEach(columns::add);
        } else {
            throw new PrestoException(GENERIC_INTERNAL_ERROR, "Invalid TableElement: " + element.getClass().getName());
        }
    }
    accessControl.checkCanCreateTable(session.getRequiredTransactionId(), session.getIdentity(), tableName);
    ConnectorId connectorId = metadata.getCatalogHandle(session, tableName.getCatalogName()).orElseThrow(() -> new PrestoException(NOT_FOUND, "Catalog does not exist: " + tableName.getCatalogName()));
    Map<String, Object> properties = metadata.getTablePropertyManager().getProperties(connectorId, tableName.getCatalogName(), statement.getProperties(), session, metadata, parameters);
    Map<String, Object> finalProperties = combineProperties(statement.getProperties().keySet(), properties, inheritedProperties);
    ConnectorTableMetadata tableMetadata = new ConnectorTableMetadata(tableName.asSchemaTableName(), columns, finalProperties);
    metadata.createTable(session, tableName.getCatalogName(), tableMetadata);
    return immediateFuture(null);
}
Also used : LikeClause(com.facebook.presto.sql.tree.LikeClause) TableMetadata(com.facebook.presto.metadata.TableMetadata) ConnectorTableMetadata(com.facebook.presto.spi.ConnectorTableMetadata) ColumnMetadata(com.facebook.presto.spi.ColumnMetadata) Optional(java.util.Optional) ArrayList(java.util.ArrayList) PrestoException(com.facebook.presto.spi.PrestoException) QualifiedObjectName(com.facebook.presto.metadata.QualifiedObjectName) MetadataUtil.createQualifiedObjectName(com.facebook.presto.metadata.MetadataUtil.createQualifiedObjectName) TableElement(com.facebook.presto.sql.tree.TableElement) ColumnDefinition(com.facebook.presto.sql.tree.ColumnDefinition) Type(com.facebook.presto.spi.type.Type) TableHandle(com.facebook.presto.metadata.TableHandle) ConnectorTableMetadata(com.facebook.presto.spi.ConnectorTableMetadata) Session(com.facebook.presto.Session) SemanticException(com.facebook.presto.sql.analyzer.SemanticException) ConnectorId(com.facebook.presto.connector.ConnectorId)

Example 3 with ColumnDefinition

use of com.facebook.presto.sql.tree.ColumnDefinition in project presto by prestodb.

the class TestSqlParser method testCreateTable.

@Test
public void testCreateTable() {
    assertStatement("CREATE TABLE foo (a VARCHAR, b BIGINT COMMENT 'hello world', c IPADDRESS)", new CreateTable(QualifiedName.of("foo"), ImmutableList.of(new ColumnDefinition(identifier("a"), "VARCHAR", true, emptyList(), Optional.empty()), new ColumnDefinition(identifier("b"), "BIGINT", true, emptyList(), Optional.of("hello world")), new ColumnDefinition(identifier("c"), "IPADDRESS", true, emptyList(), Optional.empty())), false, ImmutableList.of(), Optional.empty()));
    assertStatement("CREATE TABLE IF NOT EXISTS bar (c TIMESTAMP)", new CreateTable(QualifiedName.of("bar"), ImmutableList.of(new ColumnDefinition(identifier("c"), "TIMESTAMP", true, emptyList(), Optional.empty())), true, ImmutableList.of(), Optional.empty()));
    // with properties
    assertStatement("CREATE TABLE IF NOT EXISTS bar (c TIMESTAMP WITH (nullable = true, compression = 'LZ4'))", new CreateTable(QualifiedName.of("bar"), ImmutableList.of(new ColumnDefinition(identifier("c"), "TIMESTAMP", true, ImmutableList.of(new Property(new Identifier("nullable"), BooleanLiteral.TRUE_LITERAL), new Property(new Identifier("compression"), new StringLiteral("LZ4"))), Optional.empty())), true, ImmutableList.of(), Optional.empty()));
    // with LIKE
    assertStatement("CREATE TABLE IF NOT EXISTS bar (LIKE like_table)", new CreateTable(QualifiedName.of("bar"), ImmutableList.of(new LikeClause(QualifiedName.of("like_table"), Optional.empty())), true, ImmutableList.of(), Optional.empty()));
    assertStatement("CREATE TABLE IF NOT EXISTS bar (c TIMESTAMP, LIKE like_table)", new CreateTable(QualifiedName.of("bar"), ImmutableList.of(new ColumnDefinition(identifier("c"), "TIMESTAMP", true, emptyList(), Optional.empty()), new LikeClause(QualifiedName.of("like_table"), Optional.empty())), true, ImmutableList.of(), Optional.empty()));
    assertStatement("CREATE TABLE IF NOT EXISTS bar (c TIMESTAMP, LIKE like_table, d DATE)", new CreateTable(QualifiedName.of("bar"), ImmutableList.of(new ColumnDefinition(identifier("c"), "TIMESTAMP", true, emptyList(), Optional.empty()), new LikeClause(QualifiedName.of("like_table"), Optional.empty()), new ColumnDefinition(identifier("d"), "DATE", true, emptyList(), Optional.empty())), true, ImmutableList.of(), Optional.empty()));
    assertStatement("CREATE TABLE IF NOT EXISTS bar (LIKE like_table INCLUDING PROPERTIES)", new CreateTable(QualifiedName.of("bar"), ImmutableList.of(new LikeClause(QualifiedName.of("like_table"), Optional.of(LikeClause.PropertiesOption.INCLUDING))), true, ImmutableList.of(), Optional.empty()));
    assertStatement("CREATE TABLE IF NOT EXISTS bar (c TIMESTAMP, LIKE like_table EXCLUDING PROPERTIES)", new CreateTable(QualifiedName.of("bar"), ImmutableList.of(new ColumnDefinition(identifier("c"), "TIMESTAMP", true, emptyList(), Optional.empty()), new LikeClause(QualifiedName.of("like_table"), Optional.of(LikeClause.PropertiesOption.EXCLUDING))), true, ImmutableList.of(), Optional.empty()));
    assertStatement("CREATE TABLE IF NOT EXISTS bar (c TIMESTAMP, LIKE like_table EXCLUDING PROPERTIES) COMMENT 'test'", new CreateTable(QualifiedName.of("bar"), ImmutableList.of(new ColumnDefinition(identifier("c"), "TIMESTAMP", true, emptyList(), Optional.empty()), new LikeClause(QualifiedName.of("like_table"), Optional.of(LikeClause.PropertiesOption.EXCLUDING))), true, ImmutableList.of(), Optional.of("test")));
}
Also used : LikeClause(com.facebook.presto.sql.tree.LikeClause) Identifier(com.facebook.presto.sql.tree.Identifier) QueryUtil.quotedIdentifier(com.facebook.presto.sql.QueryUtil.quotedIdentifier) StringLiteral(com.facebook.presto.sql.tree.StringLiteral) CreateTable(com.facebook.presto.sql.tree.CreateTable) Property(com.facebook.presto.sql.tree.Property) ColumnDefinition(com.facebook.presto.sql.tree.ColumnDefinition) Test(org.testng.annotations.Test)

Example 4 with ColumnDefinition

use of com.facebook.presto.sql.tree.ColumnDefinition in project presto by prestodb.

the class TestSqlParser method testAddColumn.

@Test
public void testAddColumn() {
    assertStatement("ALTER TABLE foo.t ADD COLUMN c bigint", new AddColumn(QualifiedName.of("foo", "t"), new ColumnDefinition(identifier("c"), "bigint", true, emptyList(), Optional.empty()), false, false));
    assertStatement("ALTER TABLE foo.t ADD COLUMN d double NOT NULL", new AddColumn(QualifiedName.of("foo", "t"), new ColumnDefinition(identifier("d"), "double", false, emptyList(), Optional.empty()), false, false));
    assertStatement("ALTER TABLE IF EXISTS foo.t ADD COLUMN d double NOT NULL", new AddColumn(QualifiedName.of("foo", "t"), new ColumnDefinition(identifier("d"), "double", false, emptyList(), Optional.empty()), true, false));
    assertStatement("ALTER TABLE foo.t ADD COLUMN IF NOT EXISTS d double NOT NULL", new AddColumn(QualifiedName.of("foo", "t"), new ColumnDefinition(identifier("d"), "double", false, emptyList(), Optional.empty()), false, true));
    assertStatement("ALTER TABLE IF EXISTS foo.t ADD COLUMN IF NOT EXISTS d double NOT NULL", new AddColumn(QualifiedName.of("foo", "t"), new ColumnDefinition(identifier("d"), "double", false, emptyList(), Optional.empty()), true, true));
}
Also used : AddColumn(com.facebook.presto.sql.tree.AddColumn) ColumnDefinition(com.facebook.presto.sql.tree.ColumnDefinition) Test(org.testng.annotations.Test)

Example 5 with ColumnDefinition

use of com.facebook.presto.sql.tree.ColumnDefinition in project presto by prestodb.

the class CreateTableTask method internalExecute.

@VisibleForTesting
public ListenableFuture<?> internalExecute(CreateTable statement, Metadata metadata, AccessControl accessControl, Session session, List<Expression> parameters) {
    checkArgument(!statement.getElements().isEmpty(), "no columns for table");
    QualifiedObjectName tableName = createQualifiedObjectName(session, statement, statement.getName());
    Optional<TableHandle> tableHandle = metadata.getTableHandle(session, tableName);
    if (tableHandle.isPresent()) {
        if (!statement.isNotExists()) {
            throw new SemanticException(TABLE_ALREADY_EXISTS, statement, "Table '%s' already exists", tableName);
        }
        return immediateFuture(null);
    }
    ConnectorId connectorId = metadata.getCatalogHandle(session, tableName.getCatalogName()).orElseThrow(() -> new PrestoException(NOT_FOUND, "Catalog does not exist: " + tableName.getCatalogName()));
    LinkedHashMap<String, ColumnMetadata> columns = new LinkedHashMap<>();
    Map<String, Object> inheritedProperties = ImmutableMap.of();
    boolean includingProperties = false;
    for (TableElement element : statement.getElements()) {
        if (element instanceof ColumnDefinition) {
            ColumnDefinition column = (ColumnDefinition) element;
            String name = column.getName().getValue().toLowerCase(Locale.ENGLISH);
            Type type;
            try {
                type = metadata.getType(parseTypeSignature(column.getType()));
            } catch (IllegalArgumentException e) {
                throw new SemanticException(TYPE_MISMATCH, element, "Unknown type '%s' for column '%s'", column.getType(), column.getName());
            }
            if (type.equals(UNKNOWN)) {
                throw new SemanticException(TYPE_MISMATCH, element, "Unknown type '%s' for column '%s'", column.getType(), column.getName());
            }
            if (columns.containsKey(name)) {
                throw new SemanticException(DUPLICATE_COLUMN_NAME, column, "Column name '%s' specified more than once", column.getName());
            }
            if (!column.isNullable() && !metadata.getConnectorCapabilities(session, connectorId).contains(NOT_NULL_COLUMN_CONSTRAINT)) {
                throw new SemanticException(NOT_SUPPORTED, column, "Catalog '%s' does not support non-null column for column name '%s'", connectorId.getCatalogName(), column.getName());
            }
            Map<String, Expression> sqlProperties = mapFromProperties(column.getProperties());
            Map<String, Object> columnProperties = metadata.getColumnPropertyManager().getProperties(connectorId, tableName.getCatalogName(), sqlProperties, session, metadata, parameters);
            columns.put(name, new ColumnMetadata(name, type, column.isNullable(), column.getComment().orElse(null), null, false, columnProperties));
        } else if (element instanceof LikeClause) {
            LikeClause likeClause = (LikeClause) element;
            QualifiedObjectName likeTableName = createQualifiedObjectName(session, statement, likeClause.getTableName());
            if (!metadata.getCatalogHandle(session, likeTableName.getCatalogName()).isPresent()) {
                throw new SemanticException(MISSING_CATALOG, statement, "LIKE table catalog '%s' does not exist", likeTableName.getCatalogName());
            }
            if (!tableName.getCatalogName().equals(likeTableName.getCatalogName())) {
                throw new SemanticException(NOT_SUPPORTED, statement, "LIKE table across catalogs is not supported");
            }
            TableHandle likeTable = metadata.getTableHandle(session, likeTableName).orElseThrow(() -> new SemanticException(MISSING_TABLE, statement, "LIKE table '%s' does not exist", likeTableName));
            TableMetadata likeTableMetadata = metadata.getTableMetadata(session, likeTable);
            Optional<LikeClause.PropertiesOption> propertiesOption = likeClause.getPropertiesOption();
            if (propertiesOption.isPresent() && propertiesOption.get().equals(LikeClause.PropertiesOption.INCLUDING)) {
                if (includingProperties) {
                    throw new SemanticException(NOT_SUPPORTED, statement, "Only one LIKE clause can specify INCLUDING PROPERTIES");
                }
                includingProperties = true;
                inheritedProperties = likeTableMetadata.getMetadata().getProperties();
            }
            likeTableMetadata.getColumns().stream().filter(column -> !column.isHidden()).forEach(column -> {
                if (columns.containsKey(column.getName().toLowerCase(Locale.ENGLISH))) {
                    throw new SemanticException(DUPLICATE_COLUMN_NAME, element, "Column name '%s' specified more than once", column.getName());
                }
                columns.put(column.getName().toLowerCase(Locale.ENGLISH), column);
            });
        } else {
            throw new PrestoException(GENERIC_INTERNAL_ERROR, "Invalid TableElement: " + element.getClass().getName());
        }
    }
    accessControl.checkCanCreateTable(session.getRequiredTransactionId(), session.getIdentity(), session.getAccessControlContext(), tableName);
    Map<String, Expression> sqlProperties = mapFromProperties(statement.getProperties());
    Map<String, Object> properties = metadata.getTablePropertyManager().getProperties(connectorId, tableName.getCatalogName(), sqlProperties, session, metadata, parameters);
    Map<String, Object> finalProperties = combineProperties(sqlProperties.keySet(), properties, inheritedProperties);
    ConnectorTableMetadata tableMetadata = new ConnectorTableMetadata(toSchemaTableName(tableName), ImmutableList.copyOf(columns.values()), finalProperties, statement.getComment());
    try {
        metadata.createTable(session, tableName.getCatalogName(), tableMetadata, statement.isNotExists());
    } catch (PrestoException e) {
        // connectors are not required to handle the ignoreExisting flag
        if (!e.getErrorCode().equals(ALREADY_EXISTS.toErrorCode()) || !statement.isNotExists()) {
            throw e;
        }
    }
    return immediateFuture(null);
}
Also used : LikeClause(com.facebook.presto.sql.tree.LikeClause) TableMetadata(com.facebook.presto.metadata.TableMetadata) ConnectorTableMetadata(com.facebook.presto.spi.ConnectorTableMetadata) WarningCollector(com.facebook.presto.spi.WarningCollector) TableMetadata(com.facebook.presto.metadata.TableMetadata) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) NOT_FOUND(com.facebook.presto.spi.StandardErrorCode.NOT_FOUND) GENERIC_INTERNAL_ERROR(com.facebook.presto.spi.StandardErrorCode.GENERIC_INTERNAL_ERROR) TYPE_MISMATCH(com.facebook.presto.sql.analyzer.SemanticErrorCode.TYPE_MISMATCH) HashMap(java.util.HashMap) PrestoException(com.facebook.presto.spi.PrestoException) SemanticException(com.facebook.presto.sql.analyzer.SemanticException) LinkedHashMap(java.util.LinkedHashMap) MISSING_CATALOG(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_CATALOG) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) ColumnDefinition(com.facebook.presto.sql.tree.ColumnDefinition) ImmutableList(com.google.common.collect.ImmutableList) ALREADY_EXISTS(com.facebook.presto.spi.StandardErrorCode.ALREADY_EXISTS) NodeUtils.mapFromProperties(com.facebook.presto.sql.NodeUtils.mapFromProperties) Locale(java.util.Locale) Map(java.util.Map) QualifiedObjectName(com.facebook.presto.common.QualifiedObjectName) TableHandle(com.facebook.presto.spi.TableHandle) CreateTable(com.facebook.presto.sql.tree.CreateTable) TransactionManager(com.facebook.presto.transaction.TransactionManager) Type(com.facebook.presto.common.type.Type) ConnectorTableMetadata(com.facebook.presto.spi.ConnectorTableMetadata) Futures.immediateFuture(com.google.common.util.concurrent.Futures.immediateFuture) LikeClause(com.facebook.presto.sql.tree.LikeClause) TableElement(com.facebook.presto.sql.tree.TableElement) MetadataUtil.toSchemaTableName(com.facebook.presto.metadata.MetadataUtil.toSchemaTableName) NOT_NULL_COLUMN_CONSTRAINT(com.facebook.presto.spi.connector.ConnectorCapabilities.NOT_NULL_COLUMN_CONSTRAINT) ImmutableMap(com.google.common.collect.ImmutableMap) MISSING_TABLE(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_TABLE) Session(com.facebook.presto.Session) Set(java.util.Set) NOT_SUPPORTED(com.facebook.presto.sql.analyzer.SemanticErrorCode.NOT_SUPPORTED) List(java.util.List) UNKNOWN(com.facebook.presto.common.type.UnknownType.UNKNOWN) ColumnMetadata(com.facebook.presto.spi.ColumnMetadata) TypeSignature.parseTypeSignature(com.facebook.presto.common.type.TypeSignature.parseTypeSignature) Expression(com.facebook.presto.sql.tree.Expression) MetadataUtil.createQualifiedObjectName(com.facebook.presto.metadata.MetadataUtil.createQualifiedObjectName) DUPLICATE_COLUMN_NAME(com.facebook.presto.sql.analyzer.SemanticErrorCode.DUPLICATE_COLUMN_NAME) TABLE_ALREADY_EXISTS(com.facebook.presto.sql.analyzer.SemanticErrorCode.TABLE_ALREADY_EXISTS) Optional(java.util.Optional) VisibleForTesting(com.google.common.annotations.VisibleForTesting) ConnectorId(com.facebook.presto.spi.ConnectorId) Metadata(com.facebook.presto.metadata.Metadata) AccessControl(com.facebook.presto.security.AccessControl) ColumnMetadata(com.facebook.presto.spi.ColumnMetadata) Optional(java.util.Optional) PrestoException(com.facebook.presto.spi.PrestoException) QualifiedObjectName(com.facebook.presto.common.QualifiedObjectName) MetadataUtil.createQualifiedObjectName(com.facebook.presto.metadata.MetadataUtil.createQualifiedObjectName) TableElement(com.facebook.presto.sql.tree.TableElement) LinkedHashMap(java.util.LinkedHashMap) ColumnDefinition(com.facebook.presto.sql.tree.ColumnDefinition) Type(com.facebook.presto.common.type.Type) Expression(com.facebook.presto.sql.tree.Expression) TableHandle(com.facebook.presto.spi.TableHandle) ConnectorTableMetadata(com.facebook.presto.spi.ConnectorTableMetadata) SemanticException(com.facebook.presto.sql.analyzer.SemanticException) ConnectorId(com.facebook.presto.spi.ConnectorId) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Aggregations

ColumnDefinition (com.facebook.presto.sql.tree.ColumnDefinition)10 CreateTable (com.facebook.presto.sql.tree.CreateTable)6 Test (org.testng.annotations.Test)6 ColumnMetadata (com.facebook.presto.spi.ColumnMetadata)5 MetadataUtil.createQualifiedObjectName (com.facebook.presto.metadata.MetadataUtil.createQualifiedObjectName)4 AllowAllAccessControl (com.facebook.presto.security.AllowAllAccessControl)4 PrestoException (com.facebook.presto.spi.PrestoException)4 SemanticException (com.facebook.presto.sql.analyzer.SemanticException)4 TableElement (com.facebook.presto.sql.tree.TableElement)4 Session (com.facebook.presto.Session)3 LikeClause (com.facebook.presto.sql.tree.LikeClause)3 QualifiedObjectName (com.facebook.presto.common.QualifiedObjectName)2 Type (com.facebook.presto.common.type.Type)2 QualifiedObjectName (com.facebook.presto.metadata.QualifiedObjectName)2 TableHandle (com.facebook.presto.metadata.TableHandle)2 TableMetadata (com.facebook.presto.metadata.TableMetadata)2 ColumnHandle (com.facebook.presto.spi.ColumnHandle)2 ConnectorId (com.facebook.presto.spi.ConnectorId)2 ConnectorTableMetadata (com.facebook.presto.spi.ConnectorTableMetadata)2 TableHandle (com.facebook.presto.spi.TableHandle)2