Search in sources :

Example 11 with TpchColumnHandle

use of com.facebook.presto.tpch.TpchColumnHandle 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 12 with TpchColumnHandle

use of com.facebook.presto.tpch.TpchColumnHandle in project presto by prestodb.

the class TestValidateStreamingJoins method setup.

@BeforeClass
public void setup() {
    Session.SessionBuilder sessionBuilder = testSessionBuilder().setCatalog("local").setSchema("tiny");
    testSession = sessionBuilder.build();
    metadata = getQueryRunner().getMetadata();
    sqlParser = getQueryRunner().getSqlParser();
    TpchTableHandle nationTpchTableHandle = new TpchTableHandle("nation", 1.0);
    TpchTableHandle supplierTpchTableHandle = new TpchTableHandle("supplier", 1.0);
    ConnectorId connectorId = getCurrentConnectorId();
    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) TableHandle(com.facebook.presto.spi.TableHandle) TpchTableHandle(com.facebook.presto.tpch.TpchTableHandle) TpchTableLayoutHandle(com.facebook.presto.tpch.TpchTableLayoutHandle) Session(com.facebook.presto.Session) TpchTableHandle(com.facebook.presto.tpch.TpchTableHandle) ConnectorId(com.facebook.presto.spi.ConnectorId) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

TpchColumnHandle (com.facebook.presto.tpch.TpchColumnHandle)12 TableHandle (com.facebook.presto.spi.TableHandle)11 TpchTableHandle (com.facebook.presto.tpch.TpchTableHandle)11 ConnectorId (com.facebook.presto.spi.ConnectorId)10 BeforeClass (org.testng.annotations.BeforeClass)9 TpchTableLayoutHandle (com.facebook.presto.tpch.TpchTableLayoutHandle)8 ColumnHandle (com.facebook.presto.spi.ColumnHandle)6 TupleDomain (com.facebook.presto.common.predicate.TupleDomain)5 ImmutableList (com.google.common.collect.ImmutableList)5 ImmutableMap (com.google.common.collect.ImmutableMap)5 Optional (java.util.Optional)5 BIGINT (com.facebook.presto.common.type.BigintType.BIGINT)4 Type (com.facebook.presto.common.type.Type)4 PlanNodeIdAllocator (com.facebook.presto.spi.plan.PlanNodeIdAllocator)4 PlanBuilder (com.facebook.presto.sql.planner.iterative.rule.test.PlanBuilder)4 TestingTransactionHandle (com.facebook.presto.testing.TestingTransactionHandle)4 Map (java.util.Map)4 Domain (com.facebook.presto.common.predicate.Domain)3 Domain.singleValue (com.facebook.presto.common.predicate.Domain.singleValue)3 VarcharType.createVarcharType (com.facebook.presto.common.type.VarcharType.createVarcharType)3