Search in sources :

Example 6 with RuleTester

use of com.facebook.presto.sql.planner.iterative.rule.test.RuleTester in project presto by prestodb.

the class TestRuntimeReorderJoinSides method setUp.

@BeforeClass
public void setUp() {
    tester = new RuleTester(ImmutableList.of(), ImmutableMap.of(), Optional.of(NODES_COUNT));
    connectorId = tester.getCurrentConnectorId();
    TpchTableHandle nationTpchTableHandle = new TpchTableHandle("nation", 1.0);
    TpchTableHandle supplierTpchTableHandle = new TpchTableHandle("supplier", 1.0);
    nationTableHandle = new TableHandle(connectorId, nationTpchTableHandle, TestingTransactionHandle.create(), Optional.of(new TpchTableLayoutHandle(nationTpchTableHandle, TupleDomain.all())));
    supplierTableHandle = new TableHandle(connectorId, supplierTpchTableHandle, TestingTransactionHandle.create(), Optional.of(new TpchTableLayoutHandle(supplierTpchTableHandle, TupleDomain.all())));
    nationColumnHandle = new TpchColumnHandle("nationkey", BIGINT);
    suppColumnHandle = new TpchColumnHandle("suppkey", BIGINT);
}
Also used : TpchColumnHandle(com.facebook.presto.tpch.TpchColumnHandle) RuleTester(com.facebook.presto.sql.planner.iterative.rule.test.RuleTester) TableHandle(com.facebook.presto.spi.TableHandle) TpchTableHandle(com.facebook.presto.tpch.TpchTableHandle) TpchTableLayoutHandle(com.facebook.presto.tpch.TpchTableLayoutHandle) TpchTableHandle(com.facebook.presto.tpch.TpchTableHandle) BeforeClass(org.testng.annotations.BeforeClass)

Example 7 with RuleTester

use of com.facebook.presto.sql.planner.iterative.rule.test.RuleTester in project presto by prestodb.

the class TestReorderJoins method setUp.

@BeforeClass
public void setUp() {
    tester = new RuleTester(ImmutableList.of(), ImmutableMap.of(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name(), JOIN_REORDERING_STRATEGY, JoinReorderingStrategy.AUTOMATIC.name()), Optional.of(4));
    this.functionResolution = new FunctionResolution(tester.getMetadata().getFunctionAndTypeManager());
}
Also used : RuleTester(com.facebook.presto.sql.planner.iterative.rule.test.RuleTester) FunctionResolution(com.facebook.presto.sql.relational.FunctionResolution) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

RuleTester (com.facebook.presto.sql.planner.iterative.rule.test.RuleTester)7 SqlInvokedFunctionNamespaceManagerConfig (com.facebook.presto.functionNamespace.SqlInvokedFunctionNamespaceManagerConfig)4 NoopSqlFunctionExecutor (com.facebook.presto.functionNamespace.execution.NoopSqlFunctionExecutor)4 SqlFunctionExecutors (com.facebook.presto.functionNamespace.execution.SqlFunctionExecutors)4 InMemoryFunctionNamespaceManager (com.facebook.presto.functionNamespace.testing.InMemoryFunctionNamespaceManager)4 FunctionAndTypeManager (com.facebook.presto.metadata.FunctionAndTypeManager)4 BeforeClass (org.testng.annotations.BeforeClass)4 PlanMatchPattern.project (com.facebook.presto.sql.planner.assertions.PlanMatchPattern.project)3 PlanMatchPattern.values (com.facebook.presto.sql.planner.assertions.PlanMatchPattern.values)3 CatalogSchemaName (com.facebook.presto.common.CatalogSchemaName)2 QualifiedObjectName (com.facebook.presto.common.QualifiedObjectName)2 INTEGER (com.facebook.presto.common.type.IntegerType.INTEGER)2 TypeSignature.parseTypeSignature (com.facebook.presto.common.type.TypeSignature.parseTypeSignature)2 Metadata (com.facebook.presto.metadata.Metadata)2 FunctionImplementationType (com.facebook.presto.spi.function.FunctionImplementationType)2 THRIFT (com.facebook.presto.spi.function.FunctionImplementationType.THRIFT)2 FunctionVersion.notVersioned (com.facebook.presto.spi.function.FunctionVersion.notVersioned)2 Parameter (com.facebook.presto.spi.function.Parameter)2 RoutineCharacteristics (com.facebook.presto.spi.function.RoutineCharacteristics)2 DETERMINISTIC (com.facebook.presto.spi.function.RoutineCharacteristics.Determinism.DETERMINISTIC)2