This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 88713037bf [Bug][Fix] pipeline exec engine get wrong result when run
regression test (#17896)
88713037bf is described below
commit 88713037bf66a45638de618218cbf2b97a4fb7bb
Author: HappenLee <[email protected]>
AuthorDate: Sat Mar 18 20:41:10 2023 +0800
[Bug][Fix] pipeline exec engine get wrong result when run regression test
(#17896)
Fix regression p1:regression-test/suites/datev2/tpcds_sf1_p1/sql/pipeline
case
---
.../src/main/java/org/apache/doris/planner/OlapScanNode.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java
index cb96b42301..0c1b545fce 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java
@@ -1119,8 +1119,13 @@ public class OlapScanNode extends ScanNode {
@Override
public int getNumInstances() {
+ // In pipeline exec engine, the instance num equals be_num * parallel
instance.
+ // so here we need count distinct be_num to do the work. make sure get
right instance
if (ConnectContext.get().getSessionVariable().enablePipelineEngine()) {
- return
ConnectContext.get().getSessionVariable().getParallelExecInstanceNum();
+ int parallelInstance =
ConnectContext.get().getSessionVariable().getParallelExecInstanceNum();
+ long numBackend = result.stream().flatMap(rangeLoc ->
rangeLoc.getLocations().stream())
+ .map(loc -> loc.backend_id).distinct().count();
+ return (int) (parallelInstance * numBackend);
}
return result.size();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]