Skip to content

Commit

Permalink
[fix](nereids)only enable colocate scan for one phase global parttion…
Browse files Browse the repository at this point in the history
… topn in some condition #26473 (#26481)
  • Loading branch information
starocean999 authored Nov 6, 2023
1 parent 9ccfd18 commit 19998ce
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1523,8 +1523,8 @@ public PlanFragment visitPhysicalPartitionTopN(PhysicalPartitionTopN<? extends P
addPlanRoot(inputFragment, partitionSortNode, partitionTopN);
// in pipeline engine, we use parallel scan by default, but it broke the rule of data distribution
// we need turn of parallel scan to ensure to get correct result.
// TODO: nereids forbid all parallel scan under PhysicalSetOperation temporary
if (findOlapScanNodesByPassExchangeAndJoinNode(inputFragment.getPlanRoot())) {
if (inputFragment.getDataPartition().getType() != TPartitionType.RANDOM
&& findOlapScanNodesByPassExchangeAndJoinNode(inputFragment.getPlanRoot())) {
inputFragment.setHasColocatePlanNode(true);
}
return inputFragment;
Expand Down

0 comments on commit 19998ce

Please sign in to comment.