use of io.prestosql.benchmark.HandTpchQuery1.TpchQuery1Operator.TpchQuery1OperatorFactory in project hetu-core by openlookeng.
the class HandTpchQuery1 method createOperatorFactories.
@Override
protected List<? extends OperatorFactory> createOperatorFactories() {
// select
// returnflag,
// linestatus,
// sum(quantity) as sum_qty,
// sum(extendedprice) as sum_base_price,
// sum(extendedprice * (1 - discount)) as sum_disc_price,
// sum(extendedprice * (1 - discount) * (1 + tax)) as sum_charge,
// avg(quantity) as avg_qty,
// avg(extendedprice) as avg_price,
// avg(discount) as avg_disc,
// count(*) as count_order
// from
// lineitem
// where
// shipdate <= '1998-09-02'
// group by
// returnflag,
// linestatus
// order by
// returnflag,
// linestatus
OperatorFactory tableScanOperator = createTableScanOperator(0, new PlanNodeId("test"), "lineitem", "returnflag", "linestatus", "quantity", "extendedprice", "discount", "tax", "shipdate");
TpchQuery1OperatorFactory tpchQuery1Operator = new TpchQuery1OperatorFactory(1);
HashAggregationOperatorFactory aggregationOperator = new HashAggregationOperatorFactory(2, new PlanNodeId("test"), getColumnTypes("lineitem", "returnflag", "linestatus"), Ints.asList(0, 1), ImmutableList.of(), Step.SINGLE, ImmutableList.of(doubleSum.bind(ImmutableList.of(2), Optional.empty()), doubleSum.bind(ImmutableList.of(3), Optional.empty()), doubleSum.bind(ImmutableList.of(4), Optional.empty()), longAverage.bind(ImmutableList.of(2), Optional.empty()), doubleAverage.bind(ImmutableList.of(5), Optional.empty()), doubleAverage.bind(ImmutableList.of(6), Optional.empty()), countFunction.bind(ImmutableList.of(2), Optional.empty())), Optional.empty(), Optional.empty(), 10_000, Optional.of(new DataSize(16, MEGABYTE)), JOIN_COMPILER, false);
return ImmutableList.of(tableScanOperator, tpchQuery1Operator, aggregationOperator);
}
use of io.prestosql.benchmark.HandTpchQuery1.TpchQuery1Operator.TpchQuery1OperatorFactory in project urban-eureka by errir503.
the class HandTpchQuery1 method createOperatorFactories.
@Override
protected List<? extends OperatorFactory> createOperatorFactories() {
// select
// returnflag,
// linestatus,
// sum(quantity) as sum_qty,
// sum(extendedprice) as sum_base_price,
// sum(extendedprice * (1 - discount)) as sum_disc_price,
// sum(extendedprice * (1 - discount) * (1 + tax)) as sum_charge,
// avg(quantity) as avg_qty,
// avg(extendedprice) as avg_price,
// avg(discount) as avg_disc,
// count(*) as count_order
// from
// lineitem
// where
// shipdate <= '1998-09-02'
// group by
// returnflag,
// linestatus
// order by
// returnflag,
// linestatus
OperatorFactory tableScanOperator = createTableScanOperator(0, new PlanNodeId("test"), "lineitem", "returnflag", "linestatus", "quantity", "extendedprice", "discount", "tax", "shipdate");
TpchQuery1OperatorFactory tpchQuery1Operator = new TpchQuery1OperatorFactory(1);
HashAggregationOperatorFactory aggregationOperator = new HashAggregationOperatorFactory(2, new PlanNodeId("test"), getColumnTypes("lineitem", "returnflag", "linestatus"), Ints.asList(0, 1), ImmutableList.of(), Step.SINGLE, ImmutableList.of(doubleSum.bind(ImmutableList.of(2), Optional.empty()), doubleSum.bind(ImmutableList.of(3), Optional.empty()), doubleSum.bind(ImmutableList.of(4), Optional.empty()), longAverage.bind(ImmutableList.of(2), Optional.empty()), doubleAverage.bind(ImmutableList.of(5), Optional.empty()), doubleAverage.bind(ImmutableList.of(6), Optional.empty()), countFunction.bind(ImmutableList.of(2), Optional.empty())), Optional.empty(), Optional.empty(), 10_000, Optional.of(new DataSize(16, MEGABYTE)), JOIN_COMPILER, false);
return ImmutableList.of(tableScanOperator, tpchQuery1Operator, aggregationOperator);
}
use of io.prestosql.benchmark.HandTpchQuery1.TpchQuery1Operator.TpchQuery1OperatorFactory in project presto by prestodb.
the class HandTpchQuery1 method createOperatorFactories.
@Override
protected List<? extends OperatorFactory> createOperatorFactories() {
// select
// returnflag,
// linestatus,
// sum(quantity) as sum_qty,
// sum(extendedprice) as sum_base_price,
// sum(extendedprice * (1 - discount)) as sum_disc_price,
// sum(extendedprice * (1 - discount) * (1 + tax)) as sum_charge,
// avg(quantity) as avg_qty,
// avg(extendedprice) as avg_price,
// avg(discount) as avg_disc,
// count(*) as count_order
// from
// lineitem
// where
// shipdate <= '1998-09-02'
// group by
// returnflag,
// linestatus
// order by
// returnflag,
// linestatus
OperatorFactory tableScanOperator = createTableScanOperator(0, new PlanNodeId("test"), "lineitem", "returnflag", "linestatus", "quantity", "extendedprice", "discount", "tax", "shipdate");
TpchQuery1OperatorFactory tpchQuery1Operator = new TpchQuery1OperatorFactory(1);
HashAggregationOperatorFactory aggregationOperator = new HashAggregationOperatorFactory(2, new PlanNodeId("test"), getColumnTypes("lineitem", "returnflag", "linestatus"), Ints.asList(0, 1), ImmutableList.of(), Step.SINGLE, ImmutableList.of(doubleSum.bind(ImmutableList.of(2), Optional.empty()), doubleSum.bind(ImmutableList.of(3), Optional.empty()), doubleSum.bind(ImmutableList.of(4), Optional.empty()), longAverage.bind(ImmutableList.of(2), Optional.empty()), doubleAverage.bind(ImmutableList.of(5), Optional.empty()), doubleAverage.bind(ImmutableList.of(6), Optional.empty()), countFunction.bind(ImmutableList.of(2), Optional.empty())), Optional.empty(), Optional.empty(), 10_000, Optional.of(new DataSize(16, MEGABYTE)), JOIN_COMPILER, false);
return ImmutableList.of(tableScanOperator, tpchQuery1Operator, aggregationOperator);
}
use of io.prestosql.benchmark.HandTpchQuery1.TpchQuery1Operator.TpchQuery1OperatorFactory in project trino by trinodb.
the class HandTpchQuery1 method createOperatorFactories.
@Override
protected List<? extends OperatorFactory> createOperatorFactories() {
// select
// returnflag,
// linestatus,
// sum(quantity) as sum_qty,
// sum(extendedprice) as sum_base_price,
// sum(extendedprice * (1 - discount)) as sum_disc_price,
// sum(extendedprice * (1 - discount) * (1 + tax)) as sum_charge,
// avg(quantity) as avg_qty,
// avg(extendedprice) as avg_price,
// avg(discount) as avg_disc,
// count(*) as count_order
// from
// lineitem
// where
// shipdate <= '1998-09-02'
// group by
// returnflag,
// linestatus
// order by
// returnflag,
// linestatus
OperatorFactory tableScanOperator = createTableScanOperator(0, new PlanNodeId("test"), "lineitem", "returnflag", "linestatus", "quantity", "extendedprice", "discount", "tax", "shipdate");
TpchQuery1OperatorFactory tpchQuery1Operator = new TpchQuery1OperatorFactory(1);
HashAggregationOperatorFactory aggregationOperator = new HashAggregationOperatorFactory(2, new PlanNodeId("test"), getColumnTypes("lineitem", "returnflag", "linestatus"), Ints.asList(0, 1), ImmutableList.of(), Step.SINGLE, ImmutableList.of(doubleSum.bind(ImmutableList.of(2)), doubleSum.bind(ImmutableList.of(3)), doubleSum.bind(ImmutableList.of(4)), longAverage.bind(ImmutableList.of(2)), doubleAverage.bind(ImmutableList.of(5)), doubleAverage.bind(ImmutableList.of(6)), countFunction.bind(ImmutableList.of(2))), Optional.empty(), Optional.empty(), 10_000, Optional.of(DataSize.of(16, MEGABYTE)), new JoinCompiler(localQueryRunner.getTypeOperators()), localQueryRunner.getBlockTypeOperators(), Optional.empty());
return ImmutableList.of(tableScanOperator, tpchQuery1Operator, aggregationOperator);
}
Aggregations