Search in sources :

Example 6 with HandleJsonModule

use of com.facebook.presto.metadata.HandleJsonModule in project presto by prestodb.

the class TestHiveSplit method getJsonCodec.

private JsonCodec<HiveSplit> getJsonCodec() throws Exception {
    Module module = binder -> {
        binder.install(new JsonModule());
        binder.install(new HandleJsonModule());
        configBinder(binder).bindConfig(FeaturesConfig.class);
        FunctionAndTypeManager functionAndTypeManager = createTestFunctionAndTypeManager();
        binder.bind(TypeManager.class).toInstance(functionAndTypeManager);
        jsonBinder(binder).addDeserializerBinding(Type.class).to(TypeDeserializer.class);
        newSetBinder(binder, Type.class);
        binder.bind(BlockEncodingSerde.class).to(BlockEncodingManager.class).in(Scopes.SINGLETON);
        newSetBinder(binder, BlockEncoding.class);
        jsonBinder(binder).addSerializerBinding(Block.class).to(BlockJsonSerde.Serializer.class);
        jsonBinder(binder).addDeserializerBinding(Block.class).to(BlockJsonSerde.Deserializer.class);
        jsonCodecBinder(binder).bindJsonCodec(HiveSplit.class);
    };
    Bootstrap app = new Bootstrap(ImmutableList.of(module));
    Injector injector = app.doNotInitializeLogging().quiet().initialize();
    HandleResolver handleResolver = injector.getInstance(HandleResolver.class);
    handleResolver.addConnectorName("hive", new HiveHandleResolver());
    return injector.getInstance(new Key<JsonCodec<HiveSplit>>() {
    });
}
Also used : FunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager) Module(com.google.inject.Module) JsonCodec(com.facebook.airlift.json.JsonCodec) Bootstrap(com.facebook.airlift.bootstrap.Bootstrap) NO_PREFERENCE(com.facebook.presto.spi.schedule.NodeSelectionStrategy.NO_PREFERENCE) Column(com.facebook.presto.hive.metastore.Column) REGULAR(com.facebook.presto.hive.HiveColumnHandle.ColumnType.REGULAR) Key(com.google.inject.Key) BlockEncoding(com.facebook.presto.common.block.BlockEncoding) Assert.assertEquals(org.testng.Assert.assertEquals) Test(org.testng.annotations.Test) NO_CACHE_REQUIREMENT(com.facebook.presto.hive.CacheQuotaRequirement.NO_CACHE_REQUIREMENT) OptionalInt(java.util.OptionalInt) FunctionAndTypeManager.createTestFunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager.createTestFunctionAndTypeManager) JsonCodecBinder.jsonCodecBinder(com.facebook.airlift.json.JsonCodecBinder.jsonCodecBinder) BlockJsonSerde(com.facebook.presto.block.BlockJsonSerde) BlockEncodingSerde(com.facebook.presto.common.block.BlockEncodingSerde) ImmutableList(com.google.common.collect.ImmutableList) BlockEncodingManager(com.facebook.presto.common.block.BlockEncodingManager) TypeManager(com.facebook.presto.common.type.TypeManager) Map(java.util.Map) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) Multibinder.newSetBinder(com.google.inject.multibindings.Multibinder.newSetBinder) HIVE_LONG(com.facebook.presto.hive.HiveType.HIVE_LONG) Type(com.facebook.presto.common.type.Type) JsonModule(com.facebook.airlift.json.JsonModule) BIGINT(com.facebook.presto.common.type.BigintType.BIGINT) Storage(com.facebook.presto.hive.metastore.Storage) ImmutableSet(com.google.common.collect.ImmutableSet) StorageFormat(com.facebook.presto.hive.metastore.StorageFormat) ImmutableMap(com.google.common.collect.ImmutableMap) HostAddress(com.facebook.presto.spi.HostAddress) Set(java.util.Set) JsonBinder.jsonBinder(com.facebook.airlift.json.JsonBinder.jsonBinder) Instant(java.time.Instant) Scopes(com.google.inject.Scopes) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) Injector(com.google.inject.Injector) HIVE_STRING(com.facebook.presto.hive.HiveType.HIVE_STRING) TypeDeserializer(com.facebook.presto.type.TypeDeserializer) ColumnHandle(com.facebook.presto.spi.ColumnHandle) Optional(java.util.Optional) ConfigBinder.configBinder(com.facebook.airlift.configuration.ConfigBinder.configBinder) Block(com.facebook.presto.common.block.Block) SplitWeight(com.facebook.presto.spi.SplitWeight) HandleResolver(com.facebook.presto.metadata.HandleResolver) HandleResolver(com.facebook.presto.metadata.HandleResolver) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) BlockEncodingSerde(com.facebook.presto.common.block.BlockEncodingSerde) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) JsonModule(com.facebook.airlift.json.JsonModule) Type(com.facebook.presto.common.type.Type) JsonCodec(com.facebook.airlift.json.JsonCodec) FunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager) FunctionAndTypeManager.createTestFunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager.createTestFunctionAndTypeManager) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) TypeDeserializer(com.facebook.presto.type.TypeDeserializer) Injector(com.google.inject.Injector) Bootstrap(com.facebook.airlift.bootstrap.Bootstrap) Module(com.google.inject.Module) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) JsonModule(com.facebook.airlift.json.JsonModule) TypeDeserializer(com.facebook.presto.type.TypeDeserializer) BlockEncoding(com.facebook.presto.common.block.BlockEncoding)

Example 7 with HandleJsonModule

use of com.facebook.presto.metadata.HandleJsonModule in project presto by prestodb.

the class TestWindowNode method getJsonCodec.

private JsonCodec<WindowNode> getJsonCodec() throws Exception {
    Module module = binder -> {
        SqlParser sqlParser = new SqlParser();
        FunctionAndTypeManager functionAndTypeManager = createTestFunctionAndTypeManager();
        binder.install(new JsonModule());
        binder.install(new HandleJsonModule());
        binder.bind(SqlParser.class).toInstance(sqlParser);
        binder.bind(TypeManager.class).toInstance(functionAndTypeManager);
        configBinder(binder).bindConfig(FeaturesConfig.class);
        newSetBinder(binder, Type.class);
        jsonBinder(binder).addSerializerBinding(Slice.class).to(SliceSerializer.class);
        jsonBinder(binder).addDeserializerBinding(Slice.class).to(SliceDeserializer.class);
        jsonBinder(binder).addDeserializerBinding(Type.class).to(TypeDeserializer.class);
        jsonBinder(binder).addSerializerBinding(Expression.class).to(Serialization.ExpressionSerializer.class);
        jsonBinder(binder).addDeserializerBinding(Expression.class).to(Serialization.ExpressionDeserializer.class);
        jsonBinder(binder).addDeserializerBinding(FunctionCall.class).to(Serialization.FunctionCallDeserializer.class);
        jsonBinder(binder).addKeySerializerBinding(VariableReferenceExpression.class).to(Serialization.VariableReferenceExpressionSerializer.class);
        jsonBinder(binder).addKeyDeserializerBinding(VariableReferenceExpression.class).to(Serialization.VariableReferenceExpressionDeserializer.class);
        jsonCodecBinder(binder).bindJsonCodec(WindowNode.class);
    };
    Bootstrap app = new Bootstrap(ImmutableList.of(module));
    Injector injector = app.doNotInitializeLogging().quiet().initialize();
    return injector.getInstance(new Key<JsonCodec<WindowNode>>() {
    });
}
Also used : FunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager) Module(com.google.inject.Module) JsonCodec(com.facebook.airlift.json.JsonCodec) SliceSerializer(com.facebook.presto.server.SliceSerializer) Key(com.google.inject.Key) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) Test(org.testng.annotations.Test) ValuesNode(com.facebook.presto.spi.plan.ValuesNode) Map(java.util.Map) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) Multibinder.newSetBinder(com.google.inject.multibindings.Multibinder.newSetBinder) CallExpression(com.facebook.presto.spi.relation.CallExpression) OrderingScheme(com.facebook.presto.spi.plan.OrderingScheme) JsonModule(com.facebook.airlift.json.JsonModule) FunctionCall(com.facebook.presto.sql.tree.FunctionCall) ImmutableSet(com.google.common.collect.ImmutableSet) SortOrder(com.facebook.presto.common.block.SortOrder) ImmutableMap(com.google.common.collect.ImmutableMap) Ordering(com.facebook.presto.spi.plan.Ordering) BeforeClass(org.testng.annotations.BeforeClass) Set(java.util.Set) JsonBinder.jsonBinder(com.facebook.airlift.json.JsonBinder.jsonBinder) UUID(java.util.UUID) SqlParser(com.facebook.presto.sql.parser.SqlParser) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) PlanVariableAllocator(com.facebook.presto.sql.planner.PlanVariableAllocator) Optional(java.util.Optional) PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) Bootstrap(com.facebook.airlift.bootstrap.Bootstrap) Slice(io.airlift.slice.Slice) Assert.assertEquals(org.testng.Assert.assertEquals) FunctionAndTypeManager.createTestFunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager.createTestFunctionAndTypeManager) TypeSignatureProvider.fromTypes(com.facebook.presto.sql.analyzer.TypeSignatureProvider.fromTypes) Expressions.call(com.facebook.presto.sql.relational.Expressions.call) JsonCodecBinder.jsonCodecBinder(com.facebook.airlift.json.JsonCodecBinder.jsonCodecBinder) RANGE(com.facebook.presto.sql.planner.plan.WindowNode.Frame.WindowType.RANGE) Serialization(com.facebook.presto.sql.Serialization) SliceDeserializer(com.facebook.presto.server.SliceDeserializer) ImmutableList(com.google.common.collect.ImmutableList) TypeManager(com.facebook.presto.common.type.TypeManager) UNBOUNDED_PRECEDING(com.facebook.presto.sql.planner.plan.WindowNode.Frame.BoundType.UNBOUNDED_PRECEDING) UNBOUNDED_FOLLOWING(com.facebook.presto.sql.planner.plan.WindowNode.Frame.BoundType.UNBOUNDED_FOLLOWING) Type(com.facebook.presto.common.type.Type) BIGINT(com.facebook.presto.common.type.BigintType.BIGINT) Injector(com.google.inject.Injector) TypeDeserializer(com.facebook.presto.type.TypeDeserializer) Expression(com.facebook.presto.sql.tree.Expression) MetadataManager.createTestMetadataManager(com.facebook.presto.metadata.MetadataManager.createTestMetadataManager) FunctionHandle(com.facebook.presto.spi.function.FunctionHandle) ConfigBinder.configBinder(com.facebook.airlift.configuration.ConfigBinder.configBinder) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) SqlParser(com.facebook.presto.sql.parser.SqlParser) SliceSerializer(com.facebook.presto.server.SliceSerializer) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) JsonModule(com.facebook.airlift.json.JsonModule) Type(com.facebook.presto.common.type.Type) SliceDeserializer(com.facebook.presto.server.SliceDeserializer) JsonCodec(com.facebook.airlift.json.JsonCodec) FunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager) FunctionAndTypeManager.createTestFunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager.createTestFunctionAndTypeManager) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) Injector(com.google.inject.Injector) Bootstrap(com.facebook.airlift.bootstrap.Bootstrap) Module(com.google.inject.Module) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) JsonModule(com.facebook.airlift.json.JsonModule) TypeDeserializer(com.facebook.presto.type.TypeDeserializer)

Example 8 with HandleJsonModule

use of com.facebook.presto.metadata.HandleJsonModule in project presto by prestodb.

the class TestHttpRemoteTask method createHttpRemoteTaskFactory.

private static HttpRemoteTaskFactory createHttpRemoteTaskFactory(TestingTaskResource testingTaskResource, boolean useThriftEncoding) throws Exception {
    Bootstrap app = new Bootstrap(new JsonModule(), new SmileModule(), new ThriftCodecModule(), new HandleJsonModule(), new Module() {

        @Override
        public void configure(Binder binder) {
            binder.bind(JsonMapper.class);
            binder.bind(ThriftMapper.class);
            configBinder(binder).bindConfig(FeaturesConfig.class);
            FunctionAndTypeManager functionAndTypeManager = createTestFunctionAndTypeManager();
            binder.bind(TypeManager.class).toInstance(functionAndTypeManager);
            jsonBinder(binder).addDeserializerBinding(Type.class).to(TypeDeserializer.class);
            newSetBinder(binder, Type.class);
            smileCodecBinder(binder).bindSmileCodec(TaskStatus.class);
            smileCodecBinder(binder).bindSmileCodec(TaskInfo.class);
            smileCodecBinder(binder).bindSmileCodec(TaskUpdateRequest.class);
            smileCodecBinder(binder).bindSmileCodec(PlanFragment.class);
            smileCodecBinder(binder).bindSmileCodec(MetadataUpdates.class);
            jsonCodecBinder(binder).bindJsonCodec(TaskStatus.class);
            jsonCodecBinder(binder).bindJsonCodec(TaskInfo.class);
            jsonCodecBinder(binder).bindJsonCodec(TaskUpdateRequest.class);
            jsonCodecBinder(binder).bindJsonCodec(PlanFragment.class);
            jsonCodecBinder(binder).bindJsonCodec(MetadataUpdates.class);
            jsonBinder(binder).addKeySerializerBinding(VariableReferenceExpression.class).to(Serialization.VariableReferenceExpressionSerializer.class);
            jsonBinder(binder).addKeyDeserializerBinding(VariableReferenceExpression.class).to(Serialization.VariableReferenceExpressionDeserializer.class);
            thriftCodecBinder(binder).bindThriftCodec(TaskStatus.class);
        }

        @Provides
        private HttpRemoteTaskFactory createHttpRemoteTaskFactory(JsonMapper jsonMapper, ThriftMapper thriftMapper, JsonCodec<TaskStatus> taskStatusJsonCodec, SmileCodec<TaskStatus> taskStatusSmileCodec, ThriftCodec<TaskStatus> taskStatusThriftCodec, JsonCodec<TaskInfo> taskInfoJsonCodec, SmileCodec<TaskInfo> taskInfoSmileCodec, JsonCodec<TaskUpdateRequest> taskUpdateRequestJsonCodec, SmileCodec<TaskUpdateRequest> taskUpdateRequestSmileCodec, JsonCodec<PlanFragment> planFragmentJsonCodec, SmileCodec<PlanFragment> planFragmentSmileCodec, JsonCodec<MetadataUpdates> metadataUpdatesJsonCodec, SmileCodec<MetadataUpdates> metadataUpdatesSmileCodec) {
            JaxrsTestingHttpProcessor jaxrsTestingHttpProcessor = new JaxrsTestingHttpProcessor(URI.create("http://fake.invalid/"), testingTaskResource, jsonMapper, thriftMapper);
            TestingHttpClient testingHttpClient = new TestingHttpClient(jaxrsTestingHttpProcessor.setTrace(TRACE_HTTP));
            testingTaskResource.setHttpClient(testingHttpClient);
            return new HttpRemoteTaskFactory(new QueryManagerConfig(), TASK_MANAGER_CONFIG, testingHttpClient, new TestSqlTaskManager.MockLocationFactory(), taskStatusJsonCodec, taskStatusSmileCodec, taskStatusThriftCodec, taskInfoJsonCodec, taskInfoSmileCodec, taskUpdateRequestJsonCodec, taskUpdateRequestSmileCodec, planFragmentJsonCodec, planFragmentSmileCodec, metadataUpdatesJsonCodec, metadataUpdatesSmileCodec, new RemoteTaskStats(), new InternalCommunicationConfig().setThriftTransportEnabled(useThriftEncoding), createTestMetadataManager(), new TestQueryManager());
        }
    });
    Injector injector = app.doNotInitializeLogging().quiet().initialize();
    HandleResolver handleResolver = injector.getInstance(HandleResolver.class);
    handleResolver.addConnectorName("test", new TestingHandleResolver());
    return injector.getInstance(HttpRemoteTaskFactory.class);
}
Also used : TestingHandleResolver(com.facebook.presto.testing.TestingHandleResolver) HandleResolver(com.facebook.presto.metadata.HandleResolver) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) ThriftMapper(com.facebook.airlift.jaxrs.thrift.ThriftMapper) TaskTestUtils.createPlanFragment(com.facebook.presto.execution.TaskTestUtils.createPlanFragment) PlanFragment(com.facebook.presto.sql.planner.PlanFragment) JsonMapper(com.facebook.airlift.jaxrs.JsonMapper) TaskInfo(com.facebook.presto.execution.TaskInfo) MetadataUpdates(com.facebook.presto.metadata.MetadataUpdates) Multibinder.newSetBinder(com.google.inject.multibindings.Multibinder.newSetBinder) Binder(com.google.inject.Binder) ThriftCodecBinder.thriftCodecBinder(com.facebook.drift.codec.guice.ThriftCodecBinder.thriftCodecBinder) JsonBinder.jsonBinder(com.facebook.airlift.json.JsonBinder.jsonBinder) JsonCodecBinder.jsonCodecBinder(com.facebook.airlift.json.JsonCodecBinder.jsonCodecBinder) SmileCodecBinder.smileCodecBinder(com.facebook.airlift.json.smile.SmileCodecBinder.smileCodecBinder) ConfigBinder.configBinder(com.facebook.airlift.configuration.ConfigBinder.configBinder) InternalCommunicationConfig(com.facebook.presto.server.InternalCommunicationConfig) ThriftCodecModule(com.facebook.drift.codec.guice.ThriftCodecModule) FunctionAndTypeManager.createTestFunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager.createTestFunctionAndTypeManager) FunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager) JaxrsTestingHttpProcessor(com.facebook.airlift.jaxrs.testing.JaxrsTestingHttpProcessor) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) Injector(com.google.inject.Injector) TestingHttpClient(com.facebook.airlift.http.client.testing.TestingHttpClient) Bootstrap(com.facebook.airlift.bootstrap.Bootstrap) TestQueryManager(com.facebook.presto.execution.TestQueryManager) TypeDeserializer(com.facebook.presto.type.TypeDeserializer) TestingHandleResolver(com.facebook.presto.testing.TestingHandleResolver) TaskUpdateRequest(com.facebook.presto.server.TaskUpdateRequest) TaskStatus(com.facebook.presto.execution.TaskStatus) Provides(com.google.inject.Provides) JsonModule(com.facebook.airlift.json.JsonModule) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) MediaType(javax.ws.rs.core.MediaType) Type(com.facebook.presto.common.type.Type) SmileModule(com.facebook.airlift.json.smile.SmileModule) QueryManagerConfig(com.facebook.presto.execution.QueryManagerConfig) JsonModule(com.facebook.airlift.json.JsonModule) SmileModule(com.facebook.airlift.json.smile.SmileModule) ThriftCodecModule(com.facebook.drift.codec.guice.ThriftCodecModule) Module(com.google.inject.Module) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule)

Example 9 with HandleJsonModule

use of com.facebook.presto.metadata.HandleJsonModule in project presto by prestodb.

the class TestRowExpressionSerde method getJsonCodec.

private JsonCodec<RowExpression> getJsonCodec() throws Exception {
    Module module = binder -> {
        binder.install(new JsonModule());
        binder.install(new HandleJsonModule());
        configBinder(binder).bindConfig(FeaturesConfig.class);
        FunctionAndTypeManager functionAndTypeManager = createTestFunctionAndTypeManager();
        binder.bind(TypeManager.class).toInstance(functionAndTypeManager);
        jsonBinder(binder).addDeserializerBinding(Type.class).to(TypeDeserializer.class);
        newSetBinder(binder, Type.class);
        binder.bind(BlockEncodingSerde.class).to(BlockEncodingManager.class).in(Scopes.SINGLETON);
        newSetBinder(binder, BlockEncoding.class);
        jsonBinder(binder).addSerializerBinding(Block.class).to(BlockJsonSerde.Serializer.class);
        jsonBinder(binder).addDeserializerBinding(Block.class).to(BlockJsonSerde.Deserializer.class);
        jsonCodecBinder(binder).bindJsonCodec(RowExpression.class);
    };
    Bootstrap app = new Bootstrap(ImmutableList.of(module));
    Injector injector = app.doNotInitializeLogging().quiet().initialize();
    return injector.getInstance(new Key<JsonCodec<RowExpression>>() {
    });
}
Also used : FunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager) WarningCollector(com.facebook.presto.spi.WarningCollector) Module(com.google.inject.Module) JsonCodec(com.facebook.airlift.json.JsonCodec) MetadataManager(com.facebook.presto.metadata.MetadataManager) SqlToRowExpressionTranslator(com.facebook.presto.sql.relational.SqlToRowExpressionTranslator) Key(com.google.inject.Key) BlockEncoding(com.facebook.presto.common.block.BlockEncoding) RowExpressionOptimizer(com.facebook.presto.sql.relational.RowExpressionOptimizer) Test(org.testng.annotations.Test) Float.floatToIntBits(java.lang.Float.floatToIntBits) Expressions.constant(com.facebook.presto.sql.relational.Expressions.constant) Expressions.specialForm(com.facebook.presto.sql.relational.Expressions.specialForm) IntArrayBlock(com.facebook.presto.common.block.IntArrayBlock) TypeProvider(com.facebook.presto.sql.planner.TypeProvider) Map(java.util.Map) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) Multibinder.newSetBinder(com.google.inject.multibindings.Multibinder.newSetBinder) JsonModule(com.facebook.airlift.json.JsonModule) ImmutableMap(com.google.common.collect.ImmutableMap) DOUBLE(com.facebook.presto.common.type.DoubleType.DOUBLE) Collections.emptyList(java.util.Collections.emptyList) BeforeClass(org.testng.annotations.BeforeClass) JsonBinder.jsonBinder(com.facebook.airlift.json.JsonBinder.jsonBinder) VarcharType(com.facebook.presto.common.type.VarcharType) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) AS_DOUBLE(com.facebook.presto.sql.parser.ParsingOptions.DecimalLiteralTreatment.AS_DOUBLE) INTEGER(com.facebook.presto.common.type.IntegerType.INTEGER) ParsingOptions(com.facebook.presto.sql.parser.ParsingOptions) Bootstrap(com.facebook.airlift.bootstrap.Bootstrap) Slice(io.airlift.slice.Slice) TINYINT(com.facebook.presto.common.type.TinyintType.TINYINT) VARCHAR(com.facebook.presto.common.type.VarcharType.VARCHAR) Assert.assertEquals(org.testng.Assert.assertEquals) TIMESTAMP(com.facebook.presto.common.type.TimestampType.TIMESTAMP) ConstantExpression(com.facebook.presto.spi.relation.ConstantExpression) FunctionAndTypeManager.createTestFunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager.createTestFunctionAndTypeManager) TypeSignatureProvider.fromTypes(com.facebook.presto.sql.analyzer.TypeSignatureProvider.fromTypes) Expressions.call(com.facebook.presto.sql.relational.Expressions.call) JsonCodecBinder.jsonCodecBinder(com.facebook.airlift.json.JsonCodecBinder.jsonCodecBinder) DATE(com.facebook.presto.common.type.DateType.DATE) REAL(com.facebook.presto.common.type.RealType.REAL) BlockJsonSerde(com.facebook.presto.block.BlockJsonSerde) BlockEncodingSerde(com.facebook.presto.common.block.BlockEncodingSerde) TEST_SESSION(com.facebook.presto.SessionTestUtils.TEST_SESSION) ImmutableList(com.google.common.collect.ImmutableList) Assert.assertThrows(org.testng.Assert.assertThrows) BlockEncodingManager(com.facebook.presto.common.block.BlockEncodingManager) TypeManager(com.facebook.presto.common.type.TypeManager) BOOLEAN(com.facebook.presto.common.type.BooleanType.BOOLEAN) ArrayType(com.facebook.presto.common.type.ArrayType) HyperLogLog(com.facebook.airlift.stats.cardinality.HyperLogLog) Type(com.facebook.presto.common.type.Type) SUBSCRIPT(com.facebook.presto.common.function.OperatorType.SUBSCRIPT) RowExpression(com.facebook.presto.spi.relation.RowExpression) BIGINT(com.facebook.presto.common.type.BigintType.BIGINT) Language(org.intellij.lang.annotations.Language) OperatorType(com.facebook.presto.common.function.OperatorType) Scopes(com.google.inject.Scopes) NodeRef(com.facebook.presto.sql.tree.NodeRef) Injector(com.google.inject.Injector) OPTIMIZED(com.facebook.presto.spi.relation.ExpressionOptimizer.Level.OPTIMIZED) Scope(com.facebook.presto.sql.analyzer.Scope) TypeDeserializer(com.facebook.presto.type.TypeDeserializer) ExpressionAnalyzer(com.facebook.presto.sql.analyzer.ExpressionAnalyzer) Expression(com.facebook.presto.sql.tree.Expression) SMALLINT(com.facebook.presto.common.type.SmallintType.SMALLINT) FunctionHandle(com.facebook.presto.spi.function.FunctionHandle) ROW_CONSTRUCTOR(com.facebook.presto.spi.relation.SpecialFormExpression.Form.ROW_CONSTRUCTOR) Assert.assertTrue(org.testng.Assert.assertTrue) ConfigBinder.configBinder(com.facebook.airlift.configuration.ConfigBinder.configBinder) Block(com.facebook.presto.common.block.Block) PlanBuilder.expression(com.facebook.presto.sql.planner.iterative.rule.test.PlanBuilder.expression) RowType(com.facebook.presto.common.type.RowType) Metadata(com.facebook.presto.metadata.Metadata) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) RowExpression(com.facebook.presto.spi.relation.RowExpression) BlockEncodingSerde(com.facebook.presto.common.block.BlockEncodingSerde) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) JsonModule(com.facebook.airlift.json.JsonModule) VarcharType(com.facebook.presto.common.type.VarcharType) ArrayType(com.facebook.presto.common.type.ArrayType) Type(com.facebook.presto.common.type.Type) OperatorType(com.facebook.presto.common.function.OperatorType) RowType(com.facebook.presto.common.type.RowType) JsonCodec(com.facebook.airlift.json.JsonCodec) FunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager) FunctionAndTypeManager.createTestFunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager.createTestFunctionAndTypeManager) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) TypeDeserializer(com.facebook.presto.type.TypeDeserializer) Injector(com.google.inject.Injector) Bootstrap(com.facebook.airlift.bootstrap.Bootstrap) Module(com.google.inject.Module) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) JsonModule(com.facebook.airlift.json.JsonModule) TypeDeserializer(com.facebook.presto.type.TypeDeserializer) BlockEncoding(com.facebook.presto.common.block.BlockEncoding)

Aggregations

FunctionAndTypeManager (com.facebook.presto.metadata.FunctionAndTypeManager)9 HandleJsonModule (com.facebook.presto.metadata.HandleJsonModule)9 JsonBinder.jsonBinder (com.facebook.airlift.json.JsonBinder.jsonBinder)8 JsonCodecBinder.jsonCodecBinder (com.facebook.airlift.json.JsonCodecBinder.jsonCodecBinder)8 Type (com.facebook.presto.common.type.Type)8 TypeDeserializer (com.facebook.presto.type.TypeDeserializer)8 Multibinder.newSetBinder (com.google.inject.multibindings.Multibinder.newSetBinder)8 ConfigBinder.configBinder (com.facebook.airlift.configuration.ConfigBinder.configBinder)7 TypeManager (com.facebook.presto.common.type.TypeManager)7 FeaturesConfig (com.facebook.presto.sql.analyzer.FeaturesConfig)7 Module (com.google.inject.Module)7 Bootstrap (com.facebook.airlift.bootstrap.Bootstrap)6 JsonCodec (com.facebook.airlift.json.JsonCodec)6 JsonModule (com.facebook.airlift.json.JsonModule)6 FunctionAndTypeManager.createTestFunctionAndTypeManager (com.facebook.presto.metadata.FunctionAndTypeManager.createTestFunctionAndTypeManager)6 ImmutableList (com.google.common.collect.ImmutableList)6 Injector (com.google.inject.Injector)6 Key (com.google.inject.Key)6 BlockJsonSerde (com.facebook.presto.block.BlockJsonSerde)5 BlockEncodingManager (com.facebook.presto.common.block.BlockEncodingManager)5