Search in sources :

Example 1 with SystemConnector

use of com.facebook.presto.connector.system.SystemConnector in project presto by prestodb.

the class TestAnalyzer method createTestingCatalog.

private Catalog createTestingCatalog(String catalogName, ConnectorId connectorId) {
    ConnectorId systemId = createSystemTablesConnectorId(connectorId);
    Connector connector = createTestingConnector();
    InternalNodeManager nodeManager = new InMemoryNodeManager();
    return new Catalog(catalogName, connectorId, connector, createInformationSchemaConnectorId(connectorId), new InformationSchemaConnector(catalogName, nodeManager, metadata, accessControl), systemId, new SystemConnector(systemId, nodeManager, connector.getSystemTables(), transactionId -> transactionManager.getConnectorTransaction(transactionId, connectorId)));
}
Also used : SystemConnector(com.facebook.presto.connector.system.SystemConnector) QualifiedObjectName(com.facebook.presto.metadata.QualifiedObjectName) TablePropertyManager(com.facebook.presto.metadata.TablePropertyManager) TypeManager(com.facebook.presto.spi.type.TypeManager) MetadataManager(com.facebook.presto.metadata.MetadataManager) MISSING_SCHEMA(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_SCHEMA) TypeRegistry(com.facebook.presto.type.TypeRegistry) APPLY_FUNCTION(com.facebook.presto.operator.scalar.ApplyFunction.APPLY_FUNCTION) MISMATCHED_COLUMN_ALIASES(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISMATCHED_COLUMN_ALIASES) Test(org.testng.annotations.Test) ConnectorTransactionHandle(com.facebook.presto.spi.connector.ConnectorTransactionHandle) VIEW_IS_RECURSIVE(com.facebook.presto.sql.analyzer.SemanticErrorCode.VIEW_IS_RECURSIVE) BIGINT(com.facebook.presto.spi.type.BigintType.BIGINT) CATALOG_NOT_SPECIFIED(com.facebook.presto.sql.analyzer.SemanticErrorCode.CATALOG_NOT_SPECIFIED) NON_NUMERIC_SAMPLE_PERCENTAGE(com.facebook.presto.sql.analyzer.SemanticErrorCode.NON_NUMERIC_SAMPLE_PERCENTAGE) InternalNodeManager(com.facebook.presto.metadata.InternalNodeManager) SchemaTableName(com.facebook.presto.spi.SchemaTableName) MISMATCHED_SET_COLUMN_TYPES(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISMATCHED_SET_COLUMN_TYPES) INVALID_WINDOW_FRAME(com.facebook.presto.sql.analyzer.SemanticErrorCode.INVALID_WINDOW_FRAME) TransactionBuilder.transaction(com.facebook.presto.transaction.TransactionBuilder.transaction) SCHEMA_NOT_SPECIFIED(com.facebook.presto.sql.analyzer.SemanticErrorCode.SCHEMA_NOT_SPECIFIED) ORDER_BY_MUST_BE_IN_SELECT(com.facebook.presto.sql.analyzer.SemanticErrorCode.ORDER_BY_MUST_BE_IN_SELECT) WILDCARD_WITHOUT_FROM(com.facebook.presto.sql.analyzer.SemanticErrorCode.WILDCARD_WITHOUT_FROM) ConnectorSplitManager(com.facebook.presto.spi.connector.ConnectorSplitManager) COLUMN_TYPE_UNKNOWN(com.facebook.presto.sql.analyzer.SemanticErrorCode.COLUMN_TYPE_UNKNOWN) MUST_BE_AGGREGATION_FUNCTION(com.facebook.presto.sql.analyzer.SemanticErrorCode.MUST_BE_AGGREGATION_FUNCTION) Collections.emptyList(java.util.Collections.emptyList) INVALID_SCHEMA_NAME(com.facebook.presto.sql.analyzer.SemanticErrorCode.INVALID_SCHEMA_NAME) BeforeMethod(org.testng.annotations.BeforeMethod) VARCHAR(com.facebook.presto.spi.type.VarcharType.VARCHAR) MISSING_ATTRIBUTE(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_ATTRIBUTE) NESTED_WINDOW(com.facebook.presto.sql.analyzer.SemanticErrorCode.NESTED_WINDOW) NOT_SUPPORTED(com.facebook.presto.sql.analyzer.SemanticErrorCode.NOT_SUPPORTED) VIEW_ANALYSIS_ERROR(com.facebook.presto.sql.analyzer.SemanticErrorCode.VIEW_ANALYSIS_ERROR) TestingMetadata(com.facebook.presto.testing.TestingMetadata) SchemaPropertyManager(com.facebook.presto.metadata.SchemaPropertyManager) String.format(java.lang.String.format) SqlParser(com.facebook.presto.sql.parser.SqlParser) AMBIGUOUS_ATTRIBUTE(com.facebook.presto.sql.analyzer.SemanticErrorCode.AMBIGUOUS_ATTRIBUTE) ColumnMetadata(com.facebook.presto.spi.ColumnMetadata) MISSING_COLUMN(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_COLUMN) Catalog(com.facebook.presto.metadata.Catalog) ConnectorId.createSystemTablesConnectorId(com.facebook.presto.connector.ConnectorId.createSystemTablesConnectorId) Optional(java.util.Optional) STANDALONE_LAMBDA(com.facebook.presto.sql.analyzer.SemanticErrorCode.STANDALONE_LAMBDA) ConnectorId(com.facebook.presto.connector.ConnectorId) SystemConnector(com.facebook.presto.connector.system.SystemConnector) AllowAllAccessControl(com.facebook.presto.security.AllowAllAccessControl) JsonCodec(io.airlift.json.JsonCodec) CANNOT_HAVE_AGGREGATIONS_OR_WINDOWS(com.facebook.presto.sql.analyzer.SemanticErrorCode.CANNOT_HAVE_AGGREGATIONS_OR_WINDOWS) ConnectorMetadata(com.facebook.presto.spi.connector.ConnectorMetadata) DOUBLE(com.facebook.presto.spi.type.DoubleType.DOUBLE) WINDOW_REQUIRES_OVER(com.facebook.presto.sql.analyzer.SemanticErrorCode.WINDOW_REQUIRES_OVER) DUPLICATE_RELATION(com.facebook.presto.sql.analyzer.SemanticErrorCode.DUPLICATE_RELATION) ViewDefinition(com.facebook.presto.metadata.ViewDefinition) ArrayType(com.facebook.presto.type.ArrayType) AccessControlManager(com.facebook.presto.security.AccessControlManager) TYPE_MISMATCH(com.facebook.presto.sql.analyzer.SemanticErrorCode.TYPE_MISMATCH) MULTIPLE_FIELDS_FROM_SUBQUERY(com.facebook.presto.sql.analyzer.SemanticErrorCode.MULTIPLE_FIELDS_FROM_SUBQUERY) COLUMN_NAME_NOT_SPECIFIED(com.facebook.presto.sql.analyzer.SemanticErrorCode.COLUMN_NAME_NOT_SPECIFIED) NESTED_AGGREGATION(com.facebook.presto.sql.analyzer.SemanticErrorCode.NESTED_AGGREGATION) INVALID_ORDINAL(com.facebook.presto.sql.analyzer.SemanticErrorCode.INVALID_ORDINAL) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) MISSING_CATALOG(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_CATALOG) ImmutableList(com.google.common.collect.ImmutableList) SessionPropertyManager(com.facebook.presto.metadata.SessionPropertyManager) TransactionManager(com.facebook.presto.transaction.TransactionManager) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager) INVALID_LITERAL(com.facebook.presto.sql.analyzer.SemanticErrorCode.INVALID_LITERAL) ConnectorTableMetadata(com.facebook.presto.spi.ConnectorTableMetadata) Connector(com.facebook.presto.spi.connector.Connector) Language(org.intellij.lang.annotations.Language) MISSING_TABLE(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_TABLE) Session(com.facebook.presto.Session) NodeLocation(com.facebook.presto.sql.tree.NodeLocation) MUST_BE_AGGREGATE_OR_GROUP_BY(com.facebook.presto.sql.analyzer.SemanticErrorCode.MUST_BE_AGGREGATE_OR_GROUP_BY) Assert.fail(org.testng.Assert.fail) TestingSession.testSessionBuilder(com.facebook.presto.testing.TestingSession.testSessionBuilder) SAMPLE_PERCENTAGE_OUT_OF_RANGE(com.facebook.presto.sql.analyzer.SemanticErrorCode.SAMPLE_PERCENTAGE_OUT_OF_RANGE) CatalogManager(com.facebook.presto.metadata.CatalogManager) VIEW_IS_STALE(com.facebook.presto.sql.analyzer.SemanticErrorCode.VIEW_IS_STALE) Consumer(java.util.function.Consumer) ConnectorId.createInformationSchemaConnectorId(com.facebook.presto.connector.ConnectorId.createInformationSchemaConnectorId) IsolationLevel(com.facebook.presto.spi.transaction.IsolationLevel) ViewColumn(com.facebook.presto.metadata.ViewDefinition.ViewColumn) DUPLICATE_COLUMN_NAME(com.facebook.presto.sql.analyzer.SemanticErrorCode.DUPLICATE_COLUMN_NAME) TransactionManager.createTestTransactionManager(com.facebook.presto.transaction.TransactionManager.createTestTransactionManager) BlockEncodingManager(com.facebook.presto.block.BlockEncodingManager) Metadata(com.facebook.presto.metadata.Metadata) AccessControl(com.facebook.presto.security.AccessControl) Statement(com.facebook.presto.sql.tree.Statement) SystemConnector(com.facebook.presto.connector.system.SystemConnector) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) Connector(com.facebook.presto.spi.connector.Connector) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) InternalNodeManager(com.facebook.presto.metadata.InternalNodeManager) Catalog(com.facebook.presto.metadata.Catalog) ConnectorId.createSystemTablesConnectorId(com.facebook.presto.connector.ConnectorId.createSystemTablesConnectorId) ConnectorId(com.facebook.presto.connector.ConnectorId) ConnectorId.createInformationSchemaConnectorId(com.facebook.presto.connector.ConnectorId.createInformationSchemaConnectorId) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager)

Example 2 with SystemConnector

use of com.facebook.presto.connector.system.SystemConnector in project presto by prestodb.

the class TestAccessControlManager method registerBogusConnector.

private static ConnectorId registerBogusConnector(CatalogManager catalogManager, TransactionManager transactionManager, AccessControl accessControl, String catalogName) {
    ConnectorId connectorId = new ConnectorId(catalogName);
    Connector connector = new TpchConnectorFactory().create(catalogName, ImmutableMap.of(), new TestingConnectorContext());
    InMemoryNodeManager nodeManager = new InMemoryNodeManager();
    MetadataManager metadata = MetadataManager.createTestMetadataManager(catalogManager);
    ConnectorId systemId = createSystemTablesConnectorId(connectorId);
    catalogManager.registerCatalog(new Catalog(catalogName, connectorId, connector, createInformationSchemaConnectorId(connectorId), new InformationSchemaConnector(catalogName, nodeManager, metadata, accessControl, ImmutableList.of()), systemId, new SystemConnector(systemId, nodeManager, connector.getSystemTables(), transactionId -> transactionManager.getConnectorTransaction(transactionId, connectorId))));
    return connectorId;
}
Also used : SystemConnector(com.facebook.presto.connector.system.SystemConnector) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) Connector(com.facebook.presto.spi.connector.Connector) SystemConnector(com.facebook.presto.connector.system.SystemConnector) TpchConnectorFactory(com.facebook.presto.tpch.TpchConnectorFactory) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) MetadataManager(com.facebook.presto.metadata.MetadataManager) TestingConnectorContext(com.facebook.presto.testing.TestingConnectorContext) Catalog(com.facebook.presto.metadata.Catalog) ConnectorId.createSystemTablesConnectorId(com.facebook.presto.spi.ConnectorId.createSystemTablesConnectorId) ConnectorId.createInformationSchemaConnectorId(com.facebook.presto.spi.ConnectorId.createInformationSchemaConnectorId) ConnectorId(com.facebook.presto.spi.ConnectorId) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager)

Example 3 with SystemConnector

use of com.facebook.presto.connector.system.SystemConnector in project presto by prestodb.

the class ConnectorManager method addCatalogConnector.

private synchronized void addCatalogConnector(String catalogName, ConnectorId connectorId, ConnectorFactory factory, Map<String, String> properties) {
    // create all connectors before adding, so a broken connector does not leave the system half updated
    MaterializedConnector connector = new MaterializedConnector(connectorId, createConnector(connectorId, factory, properties));
    MaterializedConnector informationSchemaConnector = new MaterializedConnector(createInformationSchemaConnectorId(connectorId), new InformationSchemaConnector(catalogName, nodeManager, metadataManager, accessControlManager, connector.getSessionProperties()));
    ConnectorId systemId = createSystemTablesConnectorId(connectorId);
    SystemTablesProvider systemTablesProvider;
    if (nodeManager.getCurrentNode().isCoordinator()) {
        systemTablesProvider = new DelegatingSystemTablesProvider(new StaticSystemTablesProvider(connector.getSystemTables()), new MetadataBasedSystemTablesProvider(metadataManager, catalogName));
    } else {
        systemTablesProvider = new StaticSystemTablesProvider(connector.getSystemTables());
    }
    MaterializedConnector systemConnector = new MaterializedConnector(systemId, new SystemConnector(systemId, nodeManager, systemTablesProvider, transactionId -> transactionManager.getConnectorTransaction(transactionId, connectorId), connector.getSessionProperties()));
    Catalog catalog = new Catalog(catalogName, connector.getConnectorId(), connector.getConnector(), informationSchemaConnector.getConnectorId(), informationSchemaConnector.getConnector(), systemConnector.getConnectorId(), systemConnector.getConnector());
    try {
        addConnectorInternal(connector);
        addConnectorInternal(informationSchemaConnector);
        addConnectorInternal(systemConnector);
        catalogManager.registerCatalog(catalog);
    } catch (Throwable e) {
        catalogManager.removeCatalog(catalog.getCatalogName());
        removeConnectorInternal(systemConnector.getConnectorId());
        removeConnectorInternal(informationSchemaConnector.getConnectorId());
        removeConnectorInternal(connector.getConnectorId());
        throw e;
    }
}
Also used : SystemConnector(com.facebook.presto.connector.system.SystemConnector) MetadataBasedSystemTablesProvider(com.facebook.presto.connector.system.MetadataBasedSystemTablesProvider) MetadataManager(com.facebook.presto.metadata.MetadataManager) ConnectorFilterStatsCalculatorService(com.facebook.presto.cost.ConnectorFilterStatsCalculatorService) RecordPageSourceProvider(com.facebook.presto.split.RecordPageSourceProvider) RowExpressionOptimizer(com.facebook.presto.sql.relational.RowExpressionOptimizer) ConnectorPlanOptimizerManager(com.facebook.presto.sql.planner.ConnectorPlanOptimizerManager) PropertyMetadata(com.facebook.presto.spi.session.PropertyMetadata) ConnectorNodePartitioningProvider(com.facebook.presto.spi.connector.ConnectorNodePartitioningProvider) PreDestroy(javax.annotation.PreDestroy) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) InternalNodeManager(com.facebook.presto.metadata.InternalNodeManager) ConnectorRecordSetProvider(com.facebook.presto.spi.connector.ConnectorRecordSetProvider) Map(java.util.Map) PageIndexerFactory(com.facebook.presto.spi.PageIndexerFactory) SystemTable(com.facebook.presto.spi.SystemTable) ConnectorMetadataUpdaterManager(com.facebook.presto.metadata.ConnectorMetadataUpdaterManager) ConnectorPageSourceProvider(com.facebook.presto.spi.connector.ConnectorPageSourceProvider) FilterStatsCalculator(com.facebook.presto.cost.FilterStatsCalculator) ConnectorSplitManager(com.facebook.presto.spi.connector.ConnectorSplitManager) ImmutableSet(com.google.common.collect.ImmutableSet) PageSinkManager(com.facebook.presto.split.PageSinkManager) ConnectorId.createInformationSchemaConnectorId(com.facebook.presto.spi.ConnectorId.createInformationSchemaConnectorId) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) DomainTranslator(com.facebook.presto.spi.relation.DomainTranslator) Set(java.util.Set) ThreadSafe(javax.annotation.concurrent.ThreadSafe) SplitManager(com.facebook.presto.split.SplitManager) GuardedBy(javax.annotation.concurrent.GuardedBy) String.format(java.lang.String.format) SystemTablesProvider(com.facebook.presto.connector.system.SystemTablesProvider) Preconditions.checkState(com.google.common.base.Preconditions.checkState) Procedure(com.facebook.presto.spi.procedure.Procedure) List(java.util.List) Catalog(com.facebook.presto.metadata.Catalog) Optional(java.util.Optional) SystemConnector(com.facebook.presto.connector.system.SystemConnector) PredicateCompiler(com.facebook.presto.spi.relation.PredicateCompiler) ConnectorId(com.facebook.presto.spi.ConnectorId) StaticSystemTablesProvider(com.facebook.presto.connector.system.StaticSystemTablesProvider) ConnectorRowExpressionService(com.facebook.presto.sql.relational.ConnectorRowExpressionService) DeterminismEvaluator(com.facebook.presto.spi.relation.DeterminismEvaluator) Logger(com.facebook.airlift.log.Logger) NodeInfo(com.facebook.airlift.node.NodeInfo) DelegatingSystemTablesProvider(com.facebook.presto.connector.system.DelegatingSystemTablesProvider) AccessControlManager(com.facebook.presto.security.AccessControlManager) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) BlockEncodingSerde(com.facebook.presto.common.block.BlockEncodingSerde) ConcurrentMap(java.util.concurrent.ConcurrentMap) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) ConnectorPlanOptimizerProvider(com.facebook.presto.spi.connector.ConnectorPlanOptimizerProvider) Inject(javax.inject.Inject) RowExpressionFormatter(com.facebook.presto.sql.planner.planPrinter.RowExpressionFormatter) ImmutableList(com.google.common.collect.ImmutableList) PageSourceManager(com.facebook.presto.split.PageSourceManager) TypeManager(com.facebook.presto.common.type.TypeManager) Objects.requireNonNull(java.util.Objects.requireNonNull) ConnectorId.createSystemTablesConnectorId(com.facebook.presto.spi.ConnectorId.createSystemTablesConnectorId) IndexManager(com.facebook.presto.index.IndexManager) ThreadContextClassLoader(com.facebook.presto.spi.classloader.ThreadContextClassLoader) FunctionResolution(com.facebook.presto.sql.relational.FunctionResolution) PageSorter(com.facebook.presto.spi.PageSorter) ConnectorContext(com.facebook.presto.spi.connector.ConnectorContext) ConnectorPageSinkProvider(com.facebook.presto.spi.connector.ConnectorPageSinkProvider) TransactionManager(com.facebook.presto.transaction.TransactionManager) Connector(com.facebook.presto.spi.connector.Connector) ConnectorIndexProvider(com.facebook.presto.spi.connector.ConnectorIndexProvider) ConnectorFactory(com.facebook.presto.spi.connector.ConnectorFactory) CatalogManager(com.facebook.presto.metadata.CatalogManager) ConnectorMetadataUpdaterProvider(com.facebook.presto.spi.connector.ConnectorMetadataUpdaterProvider) HandleResolver(com.facebook.presto.metadata.HandleResolver) ConnectorAccessControl(com.facebook.presto.spi.connector.ConnectorAccessControl) PartitioningProviderManager(com.facebook.presto.sql.planner.PartitioningProviderManager) StaticSystemTablesProvider(com.facebook.presto.connector.system.StaticSystemTablesProvider) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) DelegatingSystemTablesProvider(com.facebook.presto.connector.system.DelegatingSystemTablesProvider) MetadataBasedSystemTablesProvider(com.facebook.presto.connector.system.MetadataBasedSystemTablesProvider) MetadataBasedSystemTablesProvider(com.facebook.presto.connector.system.MetadataBasedSystemTablesProvider) SystemTablesProvider(com.facebook.presto.connector.system.SystemTablesProvider) StaticSystemTablesProvider(com.facebook.presto.connector.system.StaticSystemTablesProvider) DelegatingSystemTablesProvider(com.facebook.presto.connector.system.DelegatingSystemTablesProvider) Catalog(com.facebook.presto.metadata.Catalog) ConnectorId.createInformationSchemaConnectorId(com.facebook.presto.spi.ConnectorId.createInformationSchemaConnectorId) ConnectorId(com.facebook.presto.spi.ConnectorId) ConnectorId.createSystemTablesConnectorId(com.facebook.presto.spi.ConnectorId.createSystemTablesConnectorId)

Example 4 with SystemConnector

use of com.facebook.presto.connector.system.SystemConnector in project presto by prestodb.

the class TestTransactionManager method registerConnector.

private static void registerConnector(CatalogManager catalogManager, TransactionManager transactionManager, String catalogName, ConnectorId connectorId, Connector connector) {
    ConnectorId systemId = createSystemTablesConnectorId(connectorId);
    InternalNodeManager nodeManager = new InMemoryNodeManager();
    MetadataManager metadata = MetadataManager.createTestMetadataManager(catalogManager);
    catalogManager.registerCatalog(new Catalog(catalogName, connectorId, connector, createInformationSchemaConnectorId(connectorId), new InformationSchemaConnector(catalogName, nodeManager, metadata, new AllowAllAccessControl(), ImmutableList.of()), systemId, new SystemConnector(systemId, nodeManager, connector.getSystemTables(), transactionId -> transactionManager.getConnectorTransaction(transactionId, connectorId))));
}
Also used : SystemConnector(com.facebook.presto.connector.system.SystemConnector) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) InternalNodeManager(com.facebook.presto.metadata.InternalNodeManager) MetadataManager(com.facebook.presto.metadata.MetadataManager) AllowAllAccessControl(com.facebook.presto.security.AllowAllAccessControl) Catalog(com.facebook.presto.metadata.Catalog) ConnectorId.createSystemTablesConnectorId(com.facebook.presto.spi.ConnectorId.createSystemTablesConnectorId) ConnectorId.createInformationSchemaConnectorId(com.facebook.presto.spi.ConnectorId.createInformationSchemaConnectorId) ConnectorId(com.facebook.presto.spi.ConnectorId) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager)

Example 5 with SystemConnector

use of com.facebook.presto.connector.system.SystemConnector in project presto by prestodb.

the class AbstractAnalyzerTest method createTestingCatalog.

private Catalog createTestingCatalog(String catalogName, ConnectorId connectorId) {
    ConnectorId systemId = createSystemTablesConnectorId(connectorId);
    Connector connector = AbstractAnalyzerTest.createTestingConnector();
    InternalNodeManager nodeManager = new InMemoryNodeManager();
    return new Catalog(catalogName, connectorId, connector, createInformationSchemaConnectorId(connectorId), new InformationSchemaConnector(catalogName, nodeManager, metadata, accessControl, ImmutableList.of()), systemId, new SystemConnector(systemId, nodeManager, connector.getSystemTables(), transactionId -> transactionManager.getConnectorTransaction(transactionId, connectorId)));
}
Also used : SystemConnector(com.facebook.presto.connector.system.SystemConnector) WarningCollector(com.facebook.presto.spi.WarningCollector) Parameter(com.facebook.presto.spi.function.Parameter) JsonCodec(com.facebook.airlift.json.JsonCodec) SqlInvokedFunctionNamespaceManagerConfig(com.facebook.presto.functionNamespace.SqlInvokedFunctionNamespaceManagerConfig) SQL(com.facebook.presto.spi.function.RoutineCharacteristics.Language.SQL) TestingWarningCollectorConfig(com.facebook.presto.testing.TestingWarningCollectorConfig) APPLY_FUNCTION(com.facebook.presto.operator.scalar.ApplyFunction.APPLY_FUNCTION) SqlInvokedFunction(com.facebook.presto.spi.function.SqlInvokedFunction) PropertyMetadata(com.facebook.presto.spi.session.PropertyMetadata) ConnectorTransactionHandle(com.facebook.presto.spi.connector.ConnectorTransactionHandle) InternalNodeManager(com.facebook.presto.metadata.InternalNodeManager) SchemaTableName(com.facebook.presto.spi.SchemaTableName) WarningCollectorConfig(com.facebook.presto.execution.warnings.WarningCollectorConfig) TransactionBuilder.transaction(com.facebook.presto.transaction.TransactionBuilder.transaction) QualifiedObjectName(com.facebook.presto.common.QualifiedObjectName) PropertyMetadata.stringProperty(com.facebook.presto.spi.session.PropertyMetadata.stringProperty) ConnectorSplitManager(com.facebook.presto.spi.connector.ConnectorSplitManager) ConnectorId.createInformationSchemaConnectorId(com.facebook.presto.spi.ConnectorId.createInformationSchemaConnectorId) ImmutableMap(com.google.common.collect.ImmutableMap) DOUBLE(com.facebook.presto.common.type.DoubleType.DOUBLE) FunctionImplementationType(com.facebook.presto.spi.function.FunctionImplementationType) InMemoryTransactionManager.createTestTransactionManager(com.facebook.presto.transaction.InMemoryTransactionManager.createTestTransactionManager) Collections.emptyList(java.util.Collections.emptyList) BeforeClass(org.testng.annotations.BeforeClass) DETERMINISTIC(com.facebook.presto.spi.function.RoutineCharacteristics.Determinism.DETERMINISTIC) InMemoryFunctionNamespaceManager(com.facebook.presto.functionNamespace.testing.InMemoryFunctionNamespaceManager) RealType(com.facebook.presto.common.type.RealType) TestingMetadata(com.facebook.presto.testing.TestingMetadata) TestingWarningCollector(com.facebook.presto.testing.TestingWarningCollector) String.format(java.lang.String.format) SqlParser(com.facebook.presto.sql.parser.SqlParser) List(java.util.List) ColumnMetadata(com.facebook.presto.spi.ColumnMetadata) RETURNS_NULL_ON_NULL_INPUT(com.facebook.presto.spi.function.RoutineCharacteristics.NullCallClause.RETURNS_NULL_ON_NULL_INPUT) Catalog(com.facebook.presto.metadata.Catalog) Optional(java.util.Optional) SystemConnector(com.facebook.presto.connector.system.SystemConnector) ConnectorId(com.facebook.presto.spi.ConnectorId) AllowAllAccessControl(com.facebook.presto.security.AllowAllAccessControl) ConnectorMetadata(com.facebook.presto.spi.connector.ConnectorMetadata) StandardTypes(com.facebook.presto.common.type.StandardTypes) ViewDefinition(com.facebook.presto.metadata.ViewDefinition) VARCHAR(com.facebook.presto.common.type.VarcharType.VARCHAR) AccessControlManager(com.facebook.presto.security.AccessControlManager) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) ImmutableList(com.google.common.collect.ImmutableList) ConnectorId.createSystemTablesConnectorId(com.facebook.presto.spi.ConnectorId.createSystemTablesConnectorId) ArrayType(com.facebook.presto.common.type.ArrayType) TransactionManager(com.facebook.presto.transaction.TransactionManager) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager) RoutineCharacteristics(com.facebook.presto.spi.function.RoutineCharacteristics) ConnectorTableMetadata(com.facebook.presto.spi.ConnectorTableMetadata) Connector(com.facebook.presto.spi.connector.Connector) BIGINT(com.facebook.presto.common.type.BigintType.BIGINT) Language(org.intellij.lang.annotations.Language) Session(com.facebook.presto.Session) NodeLocation(com.facebook.presto.sql.tree.NodeLocation) Assert.fail(org.testng.Assert.fail) TestingSession.testSessionBuilder(com.facebook.presto.testing.TestingSession.testSessionBuilder) CatalogManager(com.facebook.presto.metadata.CatalogManager) Consumer(java.util.function.Consumer) SqlFunctionExecutors(com.facebook.presto.functionNamespace.execution.SqlFunctionExecutors) TypeSignature.parseTypeSignature(com.facebook.presto.common.type.TypeSignature.parseTypeSignature) IsolationLevel(com.facebook.presto.spi.transaction.IsolationLevel) MetadataManager.createTestMetadataManager(com.facebook.presto.metadata.MetadataManager.createTestMetadataManager) FunctionVersion.notVersioned(com.facebook.presto.spi.function.FunctionVersion.notVersioned) PropertyMetadata.integerProperty(com.facebook.presto.spi.session.PropertyMetadata.integerProperty) NoopSqlFunctionExecutor(com.facebook.presto.functionNamespace.execution.NoopSqlFunctionExecutor) RowType(com.facebook.presto.common.type.RowType) Metadata(com.facebook.presto.metadata.Metadata) AccessControl(com.facebook.presto.security.AccessControl) Statement(com.facebook.presto.sql.tree.Statement) SystemConnector(com.facebook.presto.connector.system.SystemConnector) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) Connector(com.facebook.presto.spi.connector.Connector) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) InternalNodeManager(com.facebook.presto.metadata.InternalNodeManager) Catalog(com.facebook.presto.metadata.Catalog) ConnectorId.createInformationSchemaConnectorId(com.facebook.presto.spi.ConnectorId.createInformationSchemaConnectorId) ConnectorId(com.facebook.presto.spi.ConnectorId) ConnectorId.createSystemTablesConnectorId(com.facebook.presto.spi.ConnectorId.createSystemTablesConnectorId) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager)

Aggregations

InformationSchemaConnector (com.facebook.presto.connector.informationSchema.InformationSchemaConnector)5 SystemConnector (com.facebook.presto.connector.system.SystemConnector)5 Catalog (com.facebook.presto.metadata.Catalog)5 InMemoryNodeManager (com.facebook.presto.metadata.InMemoryNodeManager)4 InternalNodeManager (com.facebook.presto.metadata.InternalNodeManager)4 MetadataManager (com.facebook.presto.metadata.MetadataManager)4 ConnectorId (com.facebook.presto.spi.ConnectorId)4 ConnectorId.createInformationSchemaConnectorId (com.facebook.presto.spi.ConnectorId.createInformationSchemaConnectorId)4 ConnectorId.createSystemTablesConnectorId (com.facebook.presto.spi.ConnectorId.createSystemTablesConnectorId)4 Connector (com.facebook.presto.spi.connector.Connector)4 CatalogManager (com.facebook.presto.metadata.CatalogManager)3 AccessControlManager (com.facebook.presto.security.AccessControlManager)3 ConnectorSplitManager (com.facebook.presto.spi.connector.ConnectorSplitManager)3 Session (com.facebook.presto.Session)2 Metadata (com.facebook.presto.metadata.Metadata)2 AllowAllAccessControl (com.facebook.presto.security.AllowAllAccessControl)2 TransactionManager (com.facebook.presto.transaction.TransactionManager)2 ImmutableList (com.google.common.collect.ImmutableList)2 String.format (java.lang.String.format)2 Optional (java.util.Optional)2