[fix](nereids)AssertNumRow node's output should be nullable (#32136)
Co-authored-by: Co-Author Jerry Hu <mrhhsg@gmail.com>
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#include "assert_num_rows_operator.h"
|
||||
|
||||
#include "vec/exprs/vexpr_context.h"
|
||||
#include "vec/utils/util.hpp"
|
||||
|
||||
namespace doris::pipeline {
|
||||
|
||||
@ -35,6 +36,10 @@ AssertNumRowsOperatorX::AssertNumRowsOperatorX(ObjectPool* pool, const TPlanNode
|
||||
} else {
|
||||
_assertion = TAssertion::LE; // just compatible for the previous code
|
||||
}
|
||||
|
||||
_should_convert_output_to_nullable =
|
||||
tnode.assert_num_rows_node.__isset.should_convert_output_to_nullable &&
|
||||
tnode.assert_num_rows_node.should_convert_output_to_nullable;
|
||||
}
|
||||
|
||||
Status AssertNumRowsOperatorX::pull(doris::RuntimeState* state, vectorized::Block* block,
|
||||
@ -44,12 +49,14 @@ Status AssertNumRowsOperatorX::pull(doris::RuntimeState* state, vectorized::Bloc
|
||||
local_state.add_num_rows_returned(block->rows());
|
||||
int64_t num_rows_returned = local_state.num_rows_returned();
|
||||
bool assert_res = false;
|
||||
const auto has_more_rows = !(*eos);
|
||||
switch (_assertion) {
|
||||
case TAssertion::EQ:
|
||||
assert_res = num_rows_returned == _desired_num_rows;
|
||||
assert_res = num_rows_returned == _desired_num_rows ||
|
||||
(has_more_rows && num_rows_returned < _desired_num_rows);
|
||||
break;
|
||||
case TAssertion::NE:
|
||||
assert_res = num_rows_returned != _desired_num_rows;
|
||||
assert_res = num_rows_returned != _desired_num_rows || (has_more_rows);
|
||||
break;
|
||||
case TAssertion::LT:
|
||||
assert_res = num_rows_returned < _desired_num_rows;
|
||||
@ -58,19 +65,47 @@ Status AssertNumRowsOperatorX::pull(doris::RuntimeState* state, vectorized::Bloc
|
||||
assert_res = num_rows_returned <= _desired_num_rows;
|
||||
break;
|
||||
case TAssertion::GT:
|
||||
assert_res = num_rows_returned > _desired_num_rows;
|
||||
assert_res = num_rows_returned > _desired_num_rows || has_more_rows;
|
||||
break;
|
||||
case TAssertion::GE:
|
||||
assert_res = num_rows_returned >= _desired_num_rows;
|
||||
assert_res = num_rows_returned >= _desired_num_rows || has_more_rows;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* For nereids planner:
|
||||
* The output of `AssertNumRowsOperatorX` should be nullable.
|
||||
* If the `num_rows_returned` is 0 and `_desired_num_rows` is 1,
|
||||
* here need to insert one row of null.
|
||||
*/
|
||||
if (_should_convert_output_to_nullable) {
|
||||
if (block->rows() > 0) {
|
||||
for (size_t i = 0; i != block->columns(); ++i) {
|
||||
auto& data = block->get_by_position(i);
|
||||
data.type = vectorized::make_nullable(data.type);
|
||||
data.column = vectorized::make_nullable(data.column);
|
||||
}
|
||||
} else if (!has_more_rows && _assertion == TAssertion::EQ && num_rows_returned == 0 &&
|
||||
_desired_num_rows == 1) {
|
||||
auto new_block =
|
||||
vectorized::VectorizedUtils::create_columns_with_type_and_name(_row_descriptor);
|
||||
block->swap(new_block);
|
||||
for (size_t i = 0; i != block->columns(); ++i) {
|
||||
auto& column = block->get_by_position(i).column;
|
||||
auto& type = block->get_by_position(i).type;
|
||||
type = vectorized::make_nullable(type);
|
||||
column = type->create_column();
|
||||
column->assume_mutable()->insert_default();
|
||||
}
|
||||
assert_res = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!assert_res) {
|
||||
auto to_string_lambda = [](TAssertion::type assertion) {
|
||||
std::map<int, const char*>::const_iterator it =
|
||||
_TAssertion_VALUES_TO_NAMES.find(assertion);
|
||||
auto it = _TAssertion_VALUES_TO_NAMES.find(assertion);
|
||||
|
||||
if (it == _TAggregationOp_VALUES_TO_NAMES.end()) {
|
||||
return "NULL";
|
||||
|
||||
@ -67,6 +67,7 @@ private:
|
||||
int64_t _desired_num_rows;
|
||||
const std::string _subquery_string;
|
||||
TAssertion::type _assertion;
|
||||
bool _should_convert_output_to_nullable;
|
||||
};
|
||||
|
||||
} // namespace pipeline
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
#include "runtime/runtime_state.h"
|
||||
#include "vec/core/block.h"
|
||||
#include "vec/exprs/vexpr_context.h"
|
||||
#include "vec/utils/util.hpp"
|
||||
|
||||
namespace doris {
|
||||
class DescriptorTbl;
|
||||
@ -48,6 +49,10 @@ VAssertNumRowsNode::VAssertNumRowsNode(ObjectPool* pool, const TPlanNode& tnode,
|
||||
} else {
|
||||
_assertion = TAssertion::LE; // just compatible for the previous code
|
||||
}
|
||||
|
||||
_should_convert_output_to_nullable =
|
||||
tnode.assert_num_rows_node.__isset.should_convert_output_to_nullable &&
|
||||
tnode.assert_num_rows_node.should_convert_output_to_nullable;
|
||||
}
|
||||
|
||||
Status VAssertNumRowsNode::open(RuntimeState* state) {
|
||||
@ -61,12 +66,14 @@ Status VAssertNumRowsNode::open(RuntimeState* state) {
|
||||
Status VAssertNumRowsNode::pull(doris::RuntimeState* state, vectorized::Block* block, bool* eos) {
|
||||
_num_rows_returned += block->rows();
|
||||
bool assert_res = false;
|
||||
const auto has_more_rows = !(*eos);
|
||||
switch (_assertion) {
|
||||
case TAssertion::EQ:
|
||||
assert_res = _num_rows_returned == _desired_num_rows;
|
||||
assert_res = _num_rows_returned == _desired_num_rows ||
|
||||
(has_more_rows && _num_rows_returned < _desired_num_rows);
|
||||
break;
|
||||
case TAssertion::NE:
|
||||
assert_res = _num_rows_returned != _desired_num_rows;
|
||||
assert_res = _num_rows_returned != _desired_num_rows || has_more_rows;
|
||||
break;
|
||||
case TAssertion::LT:
|
||||
assert_res = _num_rows_returned < _desired_num_rows;
|
||||
@ -75,19 +82,47 @@ Status VAssertNumRowsNode::pull(doris::RuntimeState* state, vectorized::Block* b
|
||||
assert_res = _num_rows_returned <= _desired_num_rows;
|
||||
break;
|
||||
case TAssertion::GT:
|
||||
assert_res = _num_rows_returned > _desired_num_rows;
|
||||
assert_res = _num_rows_returned > _desired_num_rows || has_more_rows;
|
||||
break;
|
||||
case TAssertion::GE:
|
||||
assert_res = _num_rows_returned >= _desired_num_rows;
|
||||
assert_res = _num_rows_returned >= _desired_num_rows || has_more_rows;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* For nereids planner:
|
||||
* The output of `AssertNumRowsOperatorX` should be nullable.
|
||||
* If the `_num_rows_returned` is 0 and `_desired_num_rows` is 1,
|
||||
* here need to insert one row of null.
|
||||
*/
|
||||
if (_should_convert_output_to_nullable) {
|
||||
if (block->rows() > 0) {
|
||||
for (size_t i = 0; i != block->columns(); ++i) {
|
||||
auto& data = block->get_by_position(i);
|
||||
data.type = vectorized::make_nullable(data.type);
|
||||
data.column = vectorized::make_nullable(data.column);
|
||||
}
|
||||
} else if (!has_more_rows && _assertion == TAssertion::EQ && _num_rows_returned == 0 &&
|
||||
_desired_num_rows == 1) {
|
||||
auto new_block =
|
||||
vectorized::VectorizedUtils::create_columns_with_type_and_name(_row_descriptor);
|
||||
block->swap(new_block);
|
||||
for (size_t i = 0; i != block->columns(); ++i) {
|
||||
auto& column = block->get_by_position(i).column;
|
||||
auto& type = block->get_by_position(i).type;
|
||||
type = vectorized::make_nullable(type);
|
||||
column = type->create_column();
|
||||
column->assume_mutable()->insert_default();
|
||||
}
|
||||
assert_res = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!assert_res) {
|
||||
auto to_string_lambda = [](TAssertion::type assertion) {
|
||||
std::map<int, const char*>::const_iterator it =
|
||||
_TAssertion_VALUES_TO_NAMES.find(assertion);
|
||||
auto it = _TAssertion_VALUES_TO_NAMES.find(assertion);
|
||||
|
||||
if (it == _TAggregationOp_VALUES_TO_NAMES.end()) {
|
||||
return "NULL";
|
||||
|
||||
@ -45,6 +45,7 @@ private:
|
||||
int64_t _desired_num_rows;
|
||||
const std::string _subquery_string;
|
||||
TAssertion::type _assertion;
|
||||
bool _should_convert_output_to_nullable;
|
||||
};
|
||||
|
||||
} // namespace doris::vectorized
|
||||
|
||||
@ -1013,12 +1013,39 @@ public class PhysicalPlanTranslator extends DefaultPlanVisitor<PlanFragment, Pla
|
||||
PlanTranslatorContext context) {
|
||||
PlanFragment currentFragment = assertNumRows.child().accept(this, context);
|
||||
List<List<Expr>> distributeExprLists = getDistributeExprs(assertNumRows.child());
|
||||
|
||||
// we need convert all columns to nullable in AssertNumRows node
|
||||
// create a tuple for AssertNumRowsNode
|
||||
TupleDescriptor tupleDescriptor = context.generateTupleDesc();
|
||||
// create assertNode
|
||||
AssertNumRowsNode assertNumRowsNode = new AssertNumRowsNode(context.nextPlanNodeId(),
|
||||
currentFragment.getPlanRoot(),
|
||||
ExpressionTranslator.translateAssert(assertNumRows.getAssertNumRowsElement()));
|
||||
ExpressionTranslator.translateAssert(assertNumRows.getAssertNumRowsElement()), true, tupleDescriptor);
|
||||
assertNumRowsNode.setChildrenDistributeExprLists(distributeExprLists);
|
||||
assertNumRowsNode.setNereidsId(assertNumRows.getId());
|
||||
|
||||
// collect all child output slots
|
||||
List<TupleDescriptor> childTuples = context.getTupleDesc(currentFragment.getPlanRoot());
|
||||
List<SlotDescriptor> childSlotDescriptors = childTuples.stream()
|
||||
.map(TupleDescriptor::getSlots)
|
||||
.flatMap(Collection::stream)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// create output slot based on child output
|
||||
Map<ExprId, SlotReference> childOutputMap = Maps.newHashMap();
|
||||
assertNumRows.child().getOutput().stream()
|
||||
.map(SlotReference.class::cast)
|
||||
.forEach(s -> childOutputMap.put(s.getExprId(), s));
|
||||
List<SlotDescriptor> slotDescriptors = Lists.newArrayList();
|
||||
for (SlotDescriptor slot : childSlotDescriptors) {
|
||||
SlotReference sf = childOutputMap.get(context.findExprId(slot.getId()));
|
||||
SlotDescriptor sd = context.createSlotDesc(tupleDescriptor, sf, slot.getParent().getTable());
|
||||
slotDescriptors.add(sd);
|
||||
}
|
||||
|
||||
// set all output slot nullable
|
||||
slotDescriptors.forEach(sd -> sd.setIsNullable(true));
|
||||
|
||||
addPlanRoot(currentFragment, assertNumRowsNode, assertNumRows);
|
||||
return currentFragment;
|
||||
}
|
||||
|
||||
@ -60,19 +60,22 @@ public class EliminateAssertNumRows extends OneRewriteRuleFactory {
|
||||
|
||||
private boolean canEliminate(LogicalAssertNumRows<?> assertNumRows, Plan plan) {
|
||||
long maxOutputRowcount;
|
||||
AssertNumRowsElement assertNumRowsElement = assertNumRows.getAssertNumRowsElement();
|
||||
Assertion assertion = assertNumRowsElement.getAssertion();
|
||||
long assertNum = assertNumRowsElement.getDesiredNumOfRows();
|
||||
// Don't need to consider TopN, because it's generated by Sort + Limit.
|
||||
if (plan instanceof LogicalLimit) {
|
||||
maxOutputRowcount = ((LogicalLimit<?>) plan).getLimit();
|
||||
} else if (plan instanceof LogicalAggregate && ((LogicalAggregate<?>) plan).getGroupByExpressions().isEmpty()) {
|
||||
maxOutputRowcount = 1;
|
||||
if (assertion == Assertion.EQ && assertNum == 1) {
|
||||
return true;
|
||||
} else {
|
||||
maxOutputRowcount = 1;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
AssertNumRowsElement assertNumRowsElement = assertNumRows.getAssertNumRowsElement();
|
||||
Assertion assertion = assertNumRowsElement.getAssertion();
|
||||
long assertNum = assertNumRowsElement.getDesiredNumOfRows();
|
||||
|
||||
switch (assertion) {
|
||||
case NE:
|
||||
case LT:
|
||||
|
||||
@ -54,11 +54,8 @@ public class ScalarApplyToJoin extends OneRewriteRuleFactory {
|
||||
}
|
||||
|
||||
private Plan unCorrelatedToJoin(LogicalApply apply) {
|
||||
LogicalAssertNumRows assertNumRows = new LogicalAssertNumRows<>(
|
||||
new AssertNumRowsElement(
|
||||
1, apply.getSubqueryExpr().toString(),
|
||||
apply.isInProject()
|
||||
? AssertNumRowsElement.Assertion.EQ : AssertNumRowsElement.Assertion.LE),
|
||||
LogicalAssertNumRows assertNumRows = new LogicalAssertNumRows<>(new AssertNumRowsElement(1,
|
||||
apply.getSubqueryExpr().toString(), AssertNumRowsElement.Assertion.EQ),
|
||||
(LogicalPlan) apply.right());
|
||||
return new LogicalJoin<>(JoinType.CROSS_JOIN,
|
||||
ExpressionUtils.EMPTY_CONDITION,
|
||||
|
||||
@ -34,6 +34,7 @@ import com.google.common.collect.ImmutableList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Assert num rows node is used to determine whether the number of rows is less than desired num of rows.
|
||||
@ -115,8 +116,6 @@ public class LogicalAssertNumRows<CHILD_TYPE extends Plan> extends LogicalUnary<
|
||||
|
||||
@Override
|
||||
public List<Slot> computeOutput() {
|
||||
return ImmutableList.<Slot>builder()
|
||||
.addAll(child().getOutput())
|
||||
.build();
|
||||
return child().getOutput().stream().map(o -> o.withNullable(true)).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,6 +35,7 @@ import com.google.common.collect.ImmutableList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Physical assertNumRows.
|
||||
@ -59,9 +60,7 @@ public class PhysicalAssertNumRows<CHILD_TYPE extends Plan> extends PhysicalUnar
|
||||
|
||||
@Override
|
||||
public List<Slot> computeOutput() {
|
||||
return ImmutableList.<Slot>builder()
|
||||
.addAll(child().getOutput())
|
||||
.build();
|
||||
return child().getOutput().stream().map(o -> o.withNullable(true)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public AssertNumRowsElement getAssertNumRowsElement() {
|
||||
|
||||
@ -19,6 +19,7 @@ package org.apache.doris.planner;
|
||||
|
||||
import org.apache.doris.analysis.Analyzer;
|
||||
import org.apache.doris.analysis.AssertNumRowsElement;
|
||||
import org.apache.doris.analysis.TupleDescriptor;
|
||||
import org.apache.doris.common.UserException;
|
||||
import org.apache.doris.statistics.StatisticalType;
|
||||
import org.apache.doris.statistics.StatsRecursiveDerive;
|
||||
@ -43,21 +44,35 @@ public class AssertNumRowsNode extends PlanNode {
|
||||
private String subqueryString;
|
||||
private AssertNumRowsElement.Assertion assertion;
|
||||
|
||||
private boolean shouldConvertOutputToNullable = false;
|
||||
|
||||
public AssertNumRowsNode(PlanNodeId id, PlanNode input, AssertNumRowsElement assertNumRowsElement) {
|
||||
this(id, input, assertNumRowsElement, false, null);
|
||||
}
|
||||
|
||||
public AssertNumRowsNode(PlanNodeId id, PlanNode input, AssertNumRowsElement assertNumRowsElement,
|
||||
boolean convertToNullable, TupleDescriptor tupleDescriptor) {
|
||||
super(id, "ASSERT NUMBER OF ROWS", StatisticalType.ASSERT_NUM_ROWS_NODE);
|
||||
this.desiredNumOfRows = assertNumRowsElement.getDesiredNumOfRows();
|
||||
this.subqueryString = assertNumRowsElement.getSubqueryString();
|
||||
this.assertion = assertNumRowsElement.getAssertion();
|
||||
this.children.add(input);
|
||||
if (input.getOutputTupleDesc() != null) {
|
||||
this.tupleIds.add(input.getOutputTupleDesc().getId());
|
||||
if (tupleDescriptor != null) {
|
||||
this.tupleIds.add(tupleDescriptor.getId());
|
||||
} else {
|
||||
this.tupleIds.addAll(input.getTupleIds());
|
||||
if (input.getOutputTupleDesc() != null) {
|
||||
this.tupleIds.add(input.getOutputTupleDesc().getId());
|
||||
} else {
|
||||
this.tupleIds.addAll(input.getTupleIds());
|
||||
}
|
||||
}
|
||||
|
||||
this.tblRefIds.addAll(input.getTblRefIds());
|
||||
this.nullableTupleIds.addAll(input.getNullableTupleIds());
|
||||
this.shouldConvertOutputToNullable = convertToNullable;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void init(Analyzer analyzer) throws UserException {
|
||||
super.init(analyzer);
|
||||
@ -94,6 +109,7 @@ public class AssertNumRowsNode extends PlanNode {
|
||||
msg.assert_num_rows_node.setDesiredNumRows(desiredNumOfRows);
|
||||
msg.assert_num_rows_node.setSubqueryString(subqueryString);
|
||||
msg.assert_num_rows_node.setAssertion(assertion.toThrift());
|
||||
msg.assert_num_rows_node.setShouldConvertOutputToNullable(shouldConvertOutputToNullable);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -164,7 +164,6 @@ public class StatisticDeriveTest extends TestWithFeService {
|
||||
Assert.assertNotEquals(0, stmtExecutor.planner().getFragments().size());
|
||||
System.out.println(getSQLPlanOrErrorMsg("explain " + sql));
|
||||
assertSQLPlanOrErrorMsgContains(sql, "NESTED LOOP JOIN");
|
||||
assertSQLPlanOrErrorMsgContains(sql, "ASSERT NUMBER OF ROWS");
|
||||
assertSQLPlanOrErrorMsgContains(sql, "EXCHANGE");
|
||||
assertSQLPlanOrErrorMsgContains(sql, "AGGREGATE");
|
||||
assertSQLPlanOrErrorMsgContains(sql, "OlapScanNode");
|
||||
|
||||
@ -1117,6 +1117,7 @@ struct TAssertNumRowsNode {
|
||||
1: optional i64 desired_num_rows;
|
||||
2: optional string subquery_string;
|
||||
3: optional TAssertion assertion;
|
||||
4: optional bool should_convert_output_to_nullable;
|
||||
}
|
||||
|
||||
enum TRuntimeFilterType {
|
||||
|
||||
@ -33,3 +33,10 @@ true 15 1992 3021 11011920 0.000 true 9999-12-12 2015-04-02T00:00 3.141592653 2
|
||||
-- !select_sub2 --
|
||||
9
|
||||
|
||||
-- !select_assert_num_row --
|
||||
3 l 0
|
||||
3 s 5
|
||||
2 6
|
||||
\N 8
|
||||
5 9
|
||||
|
||||
|
||||
@ -23,123 +23,108 @@ PhysicalResultSink
|
||||
----------------------------------------filter((reason.r_reason_sk = 1))
|
||||
------------------------------------------PhysicalOlapScan[reason]
|
||||
--------------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------------PhysicalAssertNumRows
|
||||
------------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------------PhysicalProject
|
||||
--------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
----------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------------------hashAgg[GLOBAL]
|
||||
------------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------------------hashAgg[LOCAL]
|
||||
----------------------------------------------PhysicalProject
|
||||
------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
--------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------------PhysicalAssertNumRows
|
||||
--------------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------------PhysicalProject
|
||||
----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------PhysicalAssertNumRows
|
||||
------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------PhysicalProject
|
||||
--------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
----------------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------------PhysicalAssertNumRows
|
||||
--------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------hashAgg[GLOBAL]
|
||||
------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------------hashAgg[LOCAL]
|
||||
----------------------------------------PhysicalProject
|
||||
------------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
--------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------PhysicalAssertNumRows
|
||||
------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------PhysicalProject
|
||||
----------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
------------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------PhysicalAssertNumRows
|
||||
----------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------hashAgg[LOCAL]
|
||||
------------------------------------PhysicalProject
|
||||
--------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
----------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------PhysicalAssertNumRows
|
||||
--------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------hashAgg[GLOBAL]
|
||||
------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------hashAgg[LOCAL]
|
||||
----------------------------------PhysicalProject
|
||||
------------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
--------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------PhysicalAssertNumRows
|
||||
------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------hashAgg[GLOBAL]
|
||||
----------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------hashAgg[LOCAL]
|
||||
--------------------------------PhysicalProject
|
||||
----------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------PhysicalAssertNumRows
|
||||
----------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------hashAgg[GLOBAL]
|
||||
--------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------hashAgg[LOCAL]
|
||||
------------------------------PhysicalProject
|
||||
--------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
----------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------PhysicalAssertNumRows
|
||||
--------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------hashAgg[GLOBAL]
|
||||
------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------hashAgg[LOCAL]
|
||||
----------------------------PhysicalProject
|
||||
------------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
--------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------PhysicalAssertNumRows
|
||||
------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------hashAgg[GLOBAL]
|
||||
----------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------hashAgg[LOCAL]
|
||||
--------------------------PhysicalProject
|
||||
----------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------PhysicalAssertNumRows
|
||||
----------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------hashAgg[GLOBAL]
|
||||
--------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------hashAgg[LOCAL]
|
||||
------------------------PhysicalProject
|
||||
--------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
----------------------------PhysicalOlapScan[store_sales]
|
||||
------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------PhysicalAssertNumRows
|
||||
--------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------hashAgg[GLOBAL]
|
||||
------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------hashAgg[LOCAL]
|
||||
----------------------PhysicalProject
|
||||
------------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
--------------------------PhysicalOlapScan[store_sales]
|
||||
----------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------PhysicalAssertNumRows
|
||||
------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------hashAgg[GLOBAL]
|
||||
----------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------hashAgg[LOCAL]
|
||||
--------------------PhysicalProject
|
||||
----------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
------------------------PhysicalOlapScan[store_sales]
|
||||
--------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------PhysicalAssertNumRows
|
||||
----------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------hashAgg[GLOBAL]
|
||||
--------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------hashAgg[LOCAL]
|
||||
------------------PhysicalProject
|
||||
--------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
----------------------PhysicalOlapScan[store_sales]
|
||||
--------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------hashAgg[GLOBAL]
|
||||
------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------hashAgg[LOCAL]
|
||||
----------------PhysicalProject
|
||||
------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
--------------------PhysicalOlapScan[store_sales]
|
||||
|
||||
|
||||
@ -23,123 +23,108 @@ PhysicalResultSink
|
||||
----------------------------------------filter((reason.r_reason_sk = 1))
|
||||
------------------------------------------PhysicalOlapScan[reason]
|
||||
--------------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------------PhysicalAssertNumRows
|
||||
------------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------------PhysicalProject
|
||||
--------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
----------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------------------hashAgg[GLOBAL]
|
||||
------------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------------------hashAgg[LOCAL]
|
||||
----------------------------------------------PhysicalProject
|
||||
------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
--------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------------PhysicalAssertNumRows
|
||||
--------------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------------PhysicalProject
|
||||
----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------PhysicalAssertNumRows
|
||||
------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------PhysicalProject
|
||||
--------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
----------------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------------PhysicalAssertNumRows
|
||||
--------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------hashAgg[GLOBAL]
|
||||
------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------------hashAgg[LOCAL]
|
||||
----------------------------------------PhysicalProject
|
||||
------------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
--------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------PhysicalAssertNumRows
|
||||
------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------PhysicalProject
|
||||
----------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
------------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------PhysicalAssertNumRows
|
||||
----------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------hashAgg[LOCAL]
|
||||
------------------------------------PhysicalProject
|
||||
--------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
----------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------PhysicalAssertNumRows
|
||||
--------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------hashAgg[GLOBAL]
|
||||
------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------hashAgg[LOCAL]
|
||||
----------------------------------PhysicalProject
|
||||
------------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
--------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------PhysicalAssertNumRows
|
||||
------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------hashAgg[GLOBAL]
|
||||
----------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------hashAgg[LOCAL]
|
||||
--------------------------------PhysicalProject
|
||||
----------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------PhysicalAssertNumRows
|
||||
----------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------hashAgg[GLOBAL]
|
||||
--------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------hashAgg[LOCAL]
|
||||
------------------------------PhysicalProject
|
||||
--------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
----------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------PhysicalAssertNumRows
|
||||
--------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------hashAgg[GLOBAL]
|
||||
------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------hashAgg[LOCAL]
|
||||
----------------------------PhysicalProject
|
||||
------------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
--------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------PhysicalAssertNumRows
|
||||
------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------hashAgg[GLOBAL]
|
||||
----------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------hashAgg[LOCAL]
|
||||
--------------------------PhysicalProject
|
||||
----------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------PhysicalAssertNumRows
|
||||
----------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------hashAgg[GLOBAL]
|
||||
--------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------hashAgg[LOCAL]
|
||||
------------------------PhysicalProject
|
||||
--------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
----------------------------PhysicalOlapScan[store_sales]
|
||||
------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------PhysicalAssertNumRows
|
||||
--------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------hashAgg[GLOBAL]
|
||||
------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------hashAgg[LOCAL]
|
||||
----------------------PhysicalProject
|
||||
------------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
--------------------------PhysicalOlapScan[store_sales]
|
||||
----------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------PhysicalAssertNumRows
|
||||
------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------hashAgg[GLOBAL]
|
||||
----------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------hashAgg[LOCAL]
|
||||
--------------------PhysicalProject
|
||||
----------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
------------------------PhysicalOlapScan[store_sales]
|
||||
--------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------PhysicalAssertNumRows
|
||||
----------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------hashAgg[GLOBAL]
|
||||
--------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------hashAgg[LOCAL]
|
||||
------------------PhysicalProject
|
||||
--------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
----------------------PhysicalOlapScan[store_sales]
|
||||
--------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------hashAgg[GLOBAL]
|
||||
------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------hashAgg[LOCAL]
|
||||
----------------PhysicalProject
|
||||
------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
--------------------PhysicalOlapScan[store_sales]
|
||||
|
||||
|
||||
@ -23,123 +23,108 @@ PhysicalResultSink
|
||||
----------------------------------------filter((reason.r_reason_sk = 1))
|
||||
------------------------------------------PhysicalOlapScan[reason]
|
||||
--------------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------------PhysicalAssertNumRows
|
||||
------------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------------PhysicalProject
|
||||
--------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
----------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------------------hashAgg[GLOBAL]
|
||||
------------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------------------hashAgg[LOCAL]
|
||||
----------------------------------------------PhysicalProject
|
||||
------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
--------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------------PhysicalAssertNumRows
|
||||
--------------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------------PhysicalProject
|
||||
----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------PhysicalAssertNumRows
|
||||
------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------PhysicalProject
|
||||
--------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
----------------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------------PhysicalAssertNumRows
|
||||
--------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------hashAgg[GLOBAL]
|
||||
------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------------hashAgg[LOCAL]
|
||||
----------------------------------------PhysicalProject
|
||||
------------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
--------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------PhysicalAssertNumRows
|
||||
------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------PhysicalProject
|
||||
----------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
------------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------PhysicalAssertNumRows
|
||||
----------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------hashAgg[LOCAL]
|
||||
------------------------------------PhysicalProject
|
||||
--------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
----------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------PhysicalAssertNumRows
|
||||
--------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------hashAgg[GLOBAL]
|
||||
------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------hashAgg[LOCAL]
|
||||
----------------------------------PhysicalProject
|
||||
------------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
--------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------PhysicalAssertNumRows
|
||||
------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------hashAgg[GLOBAL]
|
||||
----------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------hashAgg[LOCAL]
|
||||
--------------------------------PhysicalProject
|
||||
----------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------PhysicalAssertNumRows
|
||||
----------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------hashAgg[GLOBAL]
|
||||
--------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------hashAgg[LOCAL]
|
||||
------------------------------PhysicalProject
|
||||
--------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
----------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------PhysicalAssertNumRows
|
||||
--------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------hashAgg[GLOBAL]
|
||||
------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------hashAgg[LOCAL]
|
||||
----------------------------PhysicalProject
|
||||
------------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
--------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------PhysicalAssertNumRows
|
||||
------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------hashAgg[GLOBAL]
|
||||
----------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------hashAgg[LOCAL]
|
||||
--------------------------PhysicalProject
|
||||
----------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------PhysicalAssertNumRows
|
||||
----------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------hashAgg[GLOBAL]
|
||||
--------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------hashAgg[LOCAL]
|
||||
------------------------PhysicalProject
|
||||
--------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
----------------------------PhysicalOlapScan[store_sales]
|
||||
------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------PhysicalAssertNumRows
|
||||
--------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------hashAgg[GLOBAL]
|
||||
------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------hashAgg[LOCAL]
|
||||
----------------------PhysicalProject
|
||||
------------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
--------------------------PhysicalOlapScan[store_sales]
|
||||
----------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------PhysicalAssertNumRows
|
||||
------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------hashAgg[GLOBAL]
|
||||
----------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------hashAgg[LOCAL]
|
||||
--------------------PhysicalProject
|
||||
----------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
------------------------PhysicalOlapScan[store_sales]
|
||||
--------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------PhysicalAssertNumRows
|
||||
----------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------hashAgg[GLOBAL]
|
||||
--------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------hashAgg[LOCAL]
|
||||
------------------PhysicalProject
|
||||
--------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
----------------------PhysicalOlapScan[store_sales]
|
||||
--------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------hashAgg[GLOBAL]
|
||||
------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------hashAgg[LOCAL]
|
||||
----------------PhysicalProject
|
||||
------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
--------------------PhysicalOlapScan[store_sales]
|
||||
|
||||
|
||||
@ -5,43 +5,13 @@ PhysicalResultSink
|
||||
----PhysicalDistribute[DistributionSpecGather]
|
||||
------PhysicalTopN[LOCAL_SORT]
|
||||
--------PhysicalProject
|
||||
----------hashJoin[INNER_JOIN] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk]
|
||||
------------PhysicalProject
|
||||
--------------PhysicalOlapScan[item] apply RFs: RF1
|
||||
----------hashJoin[INNER_JOIN] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=()
|
||||
------------PhysicalDistribute[DistributionSpecHash]
|
||||
--------------PhysicalProject
|
||||
----------------hashJoin[INNER_JOIN] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=()
|
||||
------------------hashJoin[INNER_JOIN] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk]
|
||||
--------------------PhysicalProject
|
||||
----------------------PhysicalOlapScan[item] apply RFs: RF0
|
||||
--------------------PhysicalDistribute[DistributionSpecHash]
|
||||
----------------------PhysicalProject
|
||||
------------------------filter((rnk < 11))
|
||||
--------------------------PhysicalWindow
|
||||
----------------------------PhysicalQuickSort[MERGE_SORT]
|
||||
------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------PhysicalQuickSort[LOCAL_SORT]
|
||||
----------------------------------PhysicalPartitionTopN
|
||||
------------------------------------PhysicalProject
|
||||
--------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
|
||||
----------------------------------------PhysicalProject
|
||||
------------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------------PhysicalDistribute[DistributionSpecHash]
|
||||
----------------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------------PhysicalProject
|
||||
--------------------------------------------------filter((ss1.ss_store_sk = 146))
|
||||
----------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------------------PhysicalAssertNumRows
|
||||
--------------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------------------PhysicalProject
|
||||
------------------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
|
||||
----------------------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------------------PhysicalProject
|
||||
--------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL)
|
||||
----------------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------hashJoin[INNER_JOIN] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk]
|
||||
------------------PhysicalProject
|
||||
--------------------PhysicalOlapScan[item] apply RFs: RF1
|
||||
------------------PhysicalDistribute[DistributionSpecHash]
|
||||
--------------------PhysicalProject
|
||||
----------------------filter((rnk < 11))
|
||||
------------------------PhysicalWindow
|
||||
@ -68,4 +38,35 @@ PhysicalResultSink
|
||||
----------------------------------------------------PhysicalProject
|
||||
------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL)
|
||||
--------------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------PhysicalDistribute[DistributionSpecHash]
|
||||
--------------hashJoin[INNER_JOIN] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk]
|
||||
----------------PhysicalProject
|
||||
------------------PhysicalOlapScan[item] apply RFs: RF0
|
||||
----------------PhysicalDistribute[DistributionSpecHash]
|
||||
------------------PhysicalProject
|
||||
--------------------filter((rnk < 11))
|
||||
----------------------PhysicalWindow
|
||||
------------------------PhysicalQuickSort[MERGE_SORT]
|
||||
--------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------PhysicalQuickSort[LOCAL_SORT]
|
||||
------------------------------PhysicalPartitionTopN
|
||||
--------------------------------PhysicalProject
|
||||
----------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
|
||||
------------------------------------PhysicalProject
|
||||
--------------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------------PhysicalDistribute[DistributionSpecHash]
|
||||
------------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------------PhysicalProject
|
||||
----------------------------------------------filter((ss1.ss_store_sk = 146))
|
||||
------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------------------PhysicalAssertNumRows
|
||||
----------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------------------PhysicalProject
|
||||
--------------------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------------------PhysicalDistribute[DistributionSpecHash]
|
||||
------------------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------------------PhysicalProject
|
||||
----------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL)
|
||||
------------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
|
||||
|
||||
@ -23,123 +23,108 @@ PhysicalResultSink
|
||||
----------------------------------------filter((reason.r_reason_sk = 1))
|
||||
------------------------------------------PhysicalOlapScan[reason]
|
||||
--------------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------------PhysicalAssertNumRows
|
||||
------------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------------PhysicalProject
|
||||
--------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
----------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------------------hashAgg[GLOBAL]
|
||||
------------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------------------hashAgg[LOCAL]
|
||||
----------------------------------------------PhysicalProject
|
||||
------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
--------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------------PhysicalAssertNumRows
|
||||
--------------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------------PhysicalProject
|
||||
----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------PhysicalAssertNumRows
|
||||
------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------PhysicalProject
|
||||
--------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
----------------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------------PhysicalAssertNumRows
|
||||
--------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------hashAgg[GLOBAL]
|
||||
------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------------hashAgg[LOCAL]
|
||||
----------------------------------------PhysicalProject
|
||||
------------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
--------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------PhysicalAssertNumRows
|
||||
------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------PhysicalProject
|
||||
----------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
------------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------PhysicalAssertNumRows
|
||||
----------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------hashAgg[LOCAL]
|
||||
------------------------------------PhysicalProject
|
||||
--------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
----------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------PhysicalAssertNumRows
|
||||
--------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------hashAgg[GLOBAL]
|
||||
------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------hashAgg[LOCAL]
|
||||
----------------------------------PhysicalProject
|
||||
------------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
--------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------PhysicalAssertNumRows
|
||||
------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------hashAgg[GLOBAL]
|
||||
----------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------hashAgg[LOCAL]
|
||||
--------------------------------PhysicalProject
|
||||
----------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------PhysicalAssertNumRows
|
||||
----------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------hashAgg[GLOBAL]
|
||||
--------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------hashAgg[LOCAL]
|
||||
------------------------------PhysicalProject
|
||||
--------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
----------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------PhysicalAssertNumRows
|
||||
--------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------hashAgg[GLOBAL]
|
||||
------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------hashAgg[LOCAL]
|
||||
----------------------------PhysicalProject
|
||||
------------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
--------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------PhysicalAssertNumRows
|
||||
------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------hashAgg[GLOBAL]
|
||||
----------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------hashAgg[LOCAL]
|
||||
--------------------------PhysicalProject
|
||||
----------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------PhysicalAssertNumRows
|
||||
----------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------hashAgg[GLOBAL]
|
||||
--------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------hashAgg[LOCAL]
|
||||
------------------------PhysicalProject
|
||||
--------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
----------------------------PhysicalOlapScan[store_sales]
|
||||
------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------PhysicalAssertNumRows
|
||||
--------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------hashAgg[GLOBAL]
|
||||
------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------hashAgg[LOCAL]
|
||||
----------------------PhysicalProject
|
||||
------------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
--------------------------PhysicalOlapScan[store_sales]
|
||||
----------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------PhysicalAssertNumRows
|
||||
------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------hashAgg[GLOBAL]
|
||||
----------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------hashAgg[LOCAL]
|
||||
--------------------PhysicalProject
|
||||
----------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
------------------------PhysicalOlapScan[store_sales]
|
||||
--------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------PhysicalAssertNumRows
|
||||
----------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------hashAgg[GLOBAL]
|
||||
--------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------hashAgg[LOCAL]
|
||||
------------------PhysicalProject
|
||||
--------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
----------------------PhysicalOlapScan[store_sales]
|
||||
--------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------hashAgg[GLOBAL]
|
||||
------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------hashAgg[LOCAL]
|
||||
----------------PhysicalProject
|
||||
------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
--------------------PhysicalOlapScan[store_sales]
|
||||
|
||||
|
||||
@ -5,43 +5,13 @@ PhysicalResultSink
|
||||
----PhysicalDistribute[DistributionSpecGather]
|
||||
------PhysicalTopN[LOCAL_SORT]
|
||||
--------PhysicalProject
|
||||
----------hashJoin[INNER_JOIN] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk]
|
||||
------------PhysicalProject
|
||||
--------------PhysicalOlapScan[item] apply RFs: RF1
|
||||
----------hashJoin[INNER_JOIN] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=()
|
||||
------------PhysicalDistribute[DistributionSpecHash]
|
||||
--------------PhysicalProject
|
||||
----------------hashJoin[INNER_JOIN] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=()
|
||||
------------------hashJoin[INNER_JOIN] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk]
|
||||
--------------------PhysicalProject
|
||||
----------------------PhysicalOlapScan[item] apply RFs: RF0
|
||||
--------------------PhysicalDistribute[DistributionSpecHash]
|
||||
----------------------PhysicalProject
|
||||
------------------------filter((rnk < 11))
|
||||
--------------------------PhysicalWindow
|
||||
----------------------------PhysicalQuickSort[MERGE_SORT]
|
||||
------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------PhysicalQuickSort[LOCAL_SORT]
|
||||
----------------------------------PhysicalPartitionTopN
|
||||
------------------------------------PhysicalProject
|
||||
--------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
|
||||
----------------------------------------PhysicalProject
|
||||
------------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------------PhysicalDistribute[DistributionSpecHash]
|
||||
----------------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------------PhysicalProject
|
||||
--------------------------------------------------filter((ss1.ss_store_sk = 146))
|
||||
----------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------------------PhysicalAssertNumRows
|
||||
--------------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------------------PhysicalProject
|
||||
------------------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------------------PhysicalDistribute[DistributionSpecHash]
|
||||
----------------------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------------------PhysicalProject
|
||||
--------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL)
|
||||
----------------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------hashJoin[INNER_JOIN] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk]
|
||||
------------------PhysicalProject
|
||||
--------------------PhysicalOlapScan[item] apply RFs: RF1
|
||||
------------------PhysicalDistribute[DistributionSpecHash]
|
||||
--------------------PhysicalProject
|
||||
----------------------filter((rnk < 11))
|
||||
------------------------PhysicalWindow
|
||||
@ -68,4 +38,35 @@ PhysicalResultSink
|
||||
----------------------------------------------------PhysicalProject
|
||||
------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL)
|
||||
--------------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------PhysicalDistribute[DistributionSpecHash]
|
||||
--------------hashJoin[INNER_JOIN] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk]
|
||||
----------------PhysicalProject
|
||||
------------------PhysicalOlapScan[item] apply RFs: RF0
|
||||
----------------PhysicalDistribute[DistributionSpecHash]
|
||||
------------------PhysicalProject
|
||||
--------------------filter((rnk < 11))
|
||||
----------------------PhysicalWindow
|
||||
------------------------PhysicalQuickSort[MERGE_SORT]
|
||||
--------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------PhysicalQuickSort[LOCAL_SORT]
|
||||
------------------------------PhysicalPartitionTopN
|
||||
--------------------------------PhysicalProject
|
||||
----------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
|
||||
------------------------------------PhysicalProject
|
||||
--------------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------------PhysicalDistribute[DistributionSpecHash]
|
||||
------------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------------PhysicalProject
|
||||
----------------------------------------------filter((ss1.ss_store_sk = 146))
|
||||
------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------------------PhysicalAssertNumRows
|
||||
----------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------------------PhysicalProject
|
||||
--------------------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------------------PhysicalDistribute[DistributionSpecHash]
|
||||
------------------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------------------PhysicalProject
|
||||
----------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL)
|
||||
------------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
|
||||
|
||||
@ -23,123 +23,108 @@ PhysicalResultSink
|
||||
----------------------------------------filter((reason.r_reason_sk = 1))
|
||||
------------------------------------------PhysicalOlapScan[reason]
|
||||
--------------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------------PhysicalAssertNumRows
|
||||
------------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------------PhysicalProject
|
||||
--------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
----------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------------------hashAgg[GLOBAL]
|
||||
------------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------------------hashAgg[LOCAL]
|
||||
----------------------------------------------PhysicalProject
|
||||
------------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
--------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------------PhysicalAssertNumRows
|
||||
--------------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------------PhysicalProject
|
||||
----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
------------------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------PhysicalAssertNumRows
|
||||
------------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------------hashAgg[LOCAL]
|
||||
------------------------------------------PhysicalProject
|
||||
--------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
----------------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------------PhysicalAssertNumRows
|
||||
--------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------------hashAgg[GLOBAL]
|
||||
------------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------------hashAgg[LOCAL]
|
||||
----------------------------------------PhysicalProject
|
||||
------------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1))
|
||||
--------------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------PhysicalAssertNumRows
|
||||
------------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------------hashAgg[GLOBAL]
|
||||
----------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------------hashAgg[LOCAL]
|
||||
--------------------------------------PhysicalProject
|
||||
----------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
------------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------PhysicalAssertNumRows
|
||||
----------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------------hashAgg[GLOBAL]
|
||||
--------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------------hashAgg[LOCAL]
|
||||
------------------------------------PhysicalProject
|
||||
--------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
----------------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------PhysicalAssertNumRows
|
||||
--------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------------hashAgg[GLOBAL]
|
||||
------------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------------hashAgg[LOCAL]
|
||||
----------------------------------PhysicalProject
|
||||
------------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21))
|
||||
--------------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------PhysicalAssertNumRows
|
||||
------------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------------hashAgg[GLOBAL]
|
||||
----------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------------hashAgg[LOCAL]
|
||||
--------------------------------PhysicalProject
|
||||
----------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
------------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------PhysicalAssertNumRows
|
||||
----------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------------hashAgg[GLOBAL]
|
||||
--------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------------hashAgg[LOCAL]
|
||||
------------------------------PhysicalProject
|
||||
--------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
----------------------------------PhysicalOlapScan[store_sales]
|
||||
------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------PhysicalAssertNumRows
|
||||
--------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------------hashAgg[GLOBAL]
|
||||
------------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------------hashAgg[LOCAL]
|
||||
----------------------------PhysicalProject
|
||||
------------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41))
|
||||
--------------------------------PhysicalOlapScan[store_sales]
|
||||
----------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------PhysicalAssertNumRows
|
||||
------------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------------hashAgg[GLOBAL]
|
||||
----------------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------------hashAgg[LOCAL]
|
||||
--------------------------PhysicalProject
|
||||
----------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
------------------------------PhysicalOlapScan[store_sales]
|
||||
--------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------PhysicalAssertNumRows
|
||||
----------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------------hashAgg[GLOBAL]
|
||||
--------------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------------hashAgg[LOCAL]
|
||||
------------------------PhysicalProject
|
||||
--------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
----------------------------PhysicalOlapScan[store_sales]
|
||||
------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------PhysicalAssertNumRows
|
||||
--------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------------hashAgg[GLOBAL]
|
||||
------------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------------hashAgg[LOCAL]
|
||||
----------------------PhysicalProject
|
||||
------------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61))
|
||||
--------------------------PhysicalOlapScan[store_sales]
|
||||
----------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------PhysicalAssertNumRows
|
||||
------------PhysicalDistribute[DistributionSpecReplicated]
|
||||
--------------hashAgg[GLOBAL]
|
||||
----------------PhysicalDistribute[DistributionSpecGather]
|
||||
------------------hashAgg[LOCAL]
|
||||
--------------------PhysicalProject
|
||||
----------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
------------------------PhysicalOlapScan[store_sales]
|
||||
--------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------PhysicalAssertNumRows
|
||||
----------PhysicalDistribute[DistributionSpecReplicated]
|
||||
------------hashAgg[GLOBAL]
|
||||
--------------PhysicalDistribute[DistributionSpecGather]
|
||||
----------------hashAgg[LOCAL]
|
||||
------------------PhysicalProject
|
||||
--------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
----------------------PhysicalOlapScan[store_sales]
|
||||
--------PhysicalDistribute[DistributionSpecReplicated]
|
||||
----------hashAgg[GLOBAL]
|
||||
------------PhysicalDistribute[DistributionSpecGather]
|
||||
--------------hashAgg[LOCAL]
|
||||
----------------PhysicalProject
|
||||
------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81))
|
||||
--------------------PhysicalOlapScan[store_sales]
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ suite("test_subquery") {
|
||||
sql """
|
||||
select * from nereids_test_query_db.baseall where k1 = (select k1 from nereids_test_query_db.baseall limit 2)
|
||||
"""
|
||||
exception("Expected LE 1 to be returned by expression")
|
||||
exception("Expected EQ 1 to be returned by expression")
|
||||
}
|
||||
|
||||
// test uncorrelated scalar subquery with order by and limit
|
||||
@ -254,4 +254,25 @@ suite("test_subquery") {
|
||||
sql """drop table if exists table_20_undef_undef"""
|
||||
sql """drop table if exists table_9_undef_undef"""
|
||||
|
||||
sql """drop table if exists table_100_undef_partitions2_keys3_properties4_distributed_by5"""
|
||||
sql """drop table if exists table_5_undef_partitions2_keys3_properties4_distributed_by5"""
|
||||
sql """create table table_100_undef_partitions2_keys3_properties4_distributed_by5 (
|
||||
col_int_undef_signed int/*agg_type_placeholder*/ ,
|
||||
col_varchar_10__undef_signed varchar(10)/*agg_type_placeholder*/ ,
|
||||
pk int/*agg_type_placeholder*/
|
||||
) engine=olap
|
||||
distributed by hash(pk) buckets 10
|
||||
properties("replication_num" = "1");"""
|
||||
sql """create table table_5_undef_partitions2_keys3_properties4_distributed_by5 (
|
||||
col_int_undef_signed int/*agg_type_placeholder*/ ,
|
||||
col_varchar_10__undef_signed varchar(10)/*agg_type_placeholder*/ ,
|
||||
pk int/*agg_type_placeholder*/
|
||||
) engine=olap
|
||||
distributed by hash(pk) buckets 10
|
||||
properties("replication_num" = "1");"""
|
||||
sql """insert into table_100_undef_partitions2_keys3_properties4_distributed_by5(pk,col_int_undef_signed,col_varchar_10__undef_signed) values (0,3,'l'),(1,null,''),(2,null,'really'),(3,4,''),(4,null,null),(5,3,'s'),(6,2,''),(7,1,''),(8,null,''),(9,5,''),(10,6,null),(11,9,'i'),(12,null,'u'),(13,1,'p'),(14,7,''),(15,null,'v'),(16,2,null),(17,null,''),(18,null,'my'),(19,2,null),(20,7,''),(21,9,''),(22,null,''),(23,null,'good'),(24,7,'n'),(25,1,'my'),(26,null,'k'),(27,null,'you'),(28,4,'m'),(29,0,''),(30,4,''),(31,null,null),(32,7,'i'),(33,0,null),(34,null,''),(35,null,'out'),(36,null,null),(37,null,'did'),(38,null,'l'),(39,null,'l'),(40,null,'really'),(41,9,'p'),(42,2,'u'),(43,3,''),(44,0,null),(45,2,'u'),(46,null,null),(47,8,null),(48,5,''),(49,2,'could'),(50,null,'were'),(51,null,''),(52,null,'will'),(53,null,''),(54,null,'is'),(55,0,'k'),(56,null,''),(57,2,''),(58,0,'y'),(59,5,null),(60,null,'hey'),(61,null,'from'),(62,null,'had'),(63,7,''),(64,8,''),(65,0,'he'),(66,2,'k'),(67,null,'l'),(68,0,''),(69,4,'t'),(70,6,'p'),(71,9,'so'),(72,null,null),(73,0,'u'),(74,null,'did'),(75,6,null),(76,5,''),(77,null,''),(78,null,null),(79,null,'d'),(80,9,null),(81,7,'f'),(82,null,'w'),(83,7,'z'),(84,7,'h'),(85,0,'the'),(86,null,'yes'),(87,4,''),(88,1,''),(89,null,''),(90,null,''),(91,null,''),(92,5,''),(93,null,''),(94,null,null),(95,null,null),(96,null,'for'),(97,null,null),(98,null,'her'),(99,null,null);"""
|
||||
sql """insert into table_5_undef_partitions2_keys3_properties4_distributed_by5(pk,col_int_undef_signed,col_varchar_10__undef_signed) values (0,null,'r'),(1,null,'m'),(2,9,'his'),(3,1,'good'),(4,0,null);"""
|
||||
qt_select_assert_num_row """SELECT * FROM table_100_undef_partitions2_keys3_properties4_distributed_by5 AS t1 WHERE t1.`pk` IN (0, 6, 8, 9, 5) OR t1.`pk` - 0 < (SELECT `pk` FROM table_5_undef_partitions2_keys3_properties4_distributed_by5 AS t2 WHERE t2.pk = 9) order by t1.pk;"""
|
||||
sql """drop table if exists table_100_undef_partitions2_keys3_properties4_distributed_by5"""
|
||||
sql """drop table if exists table_5_undef_partitions2_keys3_properties4_distributed_by5"""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user