Search in sources :

Example 6 with TpchTableLayoutHandle

use of com.facebook.presto.tpch.TpchTableLayoutHandle 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

TableHandle (com.facebook.presto.spi.TableHandle)6 TpchTableHandle (com.facebook.presto.tpch.TpchTableHandle)6 TpchTableLayoutHandle (com.facebook.presto.tpch.TpchTableLayoutHandle)6 BeforeClass (org.testng.annotations.BeforeClass)5 ConnectorId (com.facebook.presto.spi.ConnectorId)4 TpchColumnHandle (com.facebook.presto.tpch.TpchColumnHandle)4 Session (com.facebook.presto.Session)1 ColumnHandle (com.facebook.presto.spi.ColumnHandle)1 PlanNodeId (com.facebook.presto.spi.plan.PlanNodeId)1 PlanNodeIdAllocator (com.facebook.presto.spi.plan.PlanNodeIdAllocator)1 TableScanNode (com.facebook.presto.spi.plan.TableScanNode)1 VariableReferenceExpression (com.facebook.presto.spi.relation.VariableReferenceExpression)1 PlanBuilder (com.facebook.presto.sql.planner.iterative.rule.test.PlanBuilder)1 RuleTester (com.facebook.presto.sql.planner.iterative.rule.test.RuleTester)1 ImmutableMap (com.google.common.collect.ImmutableMap)1