use of com.facebook.presto.tpch.TpchTableLayoutHandle in project presto by prestodb.
the class TestValidateStreamingAggregations method setup.
@BeforeClass
public void setup() {
metadata = getQueryRunner().getMetadata();
sqlParser = getQueryRunner().getSqlParser();
TpchTableHandle nationTpchTableHandle = new TpchTableHandle("nation", 1.0);
ConnectorId connectorId = getCurrentConnectorId();
nationTableHandle = new TableHandle(connectorId, nationTpchTableHandle, TestingTransactionHandle.create(), Optional.of(new TpchTableLayoutHandle(nationTpchTableHandle, TupleDomain.all())));
}
use of com.facebook.presto.tpch.TpchTableLayoutHandle in project presto by prestodb.
the class TestValidateAggregationsWithDefaultValues method setup.
@BeforeClass
public void setup() {
metadata = getQueryRunner().getMetadata();
builder = new PlanBuilder(TEST_SESSION, new PlanNodeIdAllocator(), metadata);
ConnectorId connectorId = getCurrentConnectorId();
TpchTableHandle nationTpchTableHandle = new TpchTableHandle("nation", 1.0);
TableHandle nationTableHandle = new TableHandle(connectorId, nationTpchTableHandle, TestingTransactionHandle.create(), Optional.of(new TpchTableLayoutHandle(nationTpchTableHandle, TupleDomain.all())));
TpchColumnHandle nationkeyColumnHandle = new TpchColumnHandle("nationkey", BIGINT);
variable = builder.variable("nationkey");
tableScanNode = builder.tableScan(nationTableHandle, ImmutableList.of(variable), ImmutableMap.of(variable, nationkeyColumnHandle));
}
use of com.facebook.presto.tpch.TpchTableLayoutHandle in project presto by prestodb.
the class TestCostCalculator method tableScan.
private TableScanNode tableScan(String id, List<VariableReferenceExpression> variables) {
ImmutableMap.Builder<VariableReferenceExpression, ColumnHandle> assignments = ImmutableMap.builder();
for (VariableReferenceExpression variable : variables) {
assignments.put(variable, new TpchColumnHandle("orderkey", BIGINT));
}
TpchTableHandle tableHandle = new TpchTableHandle("orders", 1.0);
return new TableScanNode(Optional.empty(), new PlanNodeId(id), new TableHandle(new ConnectorId("tpch"), tableHandle, TpchTransactionHandle.INSTANCE, Optional.of(new TpchTableLayoutHandle(tableHandle, TupleDomain.all()))), variables, assignments.build(), TupleDomain.all(), TupleDomain.all());
}
use of com.facebook.presto.tpch.TpchTableLayoutHandle in project presto by prestodb.
the class TestPickTableLayout method setUpBeforeClass.
@BeforeClass
public void setUpBeforeClass() {
pickTableLayout = new PickTableLayout(tester().getMetadata());
connectorId = tester().getCurrentConnectorId();
TpchTableHandle nationTpchTableHandle = new TpchTableHandle("nation", 1.0);
TpchTableHandle orderTpchTableHandle = new TpchTableHandle("orders", 1.0);
nationTableHandle = new TableHandle(connectorId, nationTpchTableHandle, TestingTransactionHandle.create(), Optional.of(new TpchTableLayoutHandle(nationTpchTableHandle, TupleDomain.all())));
ordersTableHandle = new TableHandle(connectorId, orderTpchTableHandle, TestingTransactionHandle.create(), Optional.of(new TpchTableLayoutHandle(orderTpchTableHandle, TupleDomain.all())));
}
use of com.facebook.presto.tpch.TpchTableLayoutHandle 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);
}
Aggregations