This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new d856a286bd9 branch-3.0: [fix](split)Fixed the bug that batch mode
split could not query data in multiple be scenarios. #46218 (#46226)
d856a286bd9 is described below
commit d856a286bd944b61637a22bace117a52781857c0
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Jan 1 14:54:17 2025 +0800
branch-3.0: [fix](split)Fixed the bug that batch mode split could not query
data in multiple be scenarios. #46218 (#46226)
Cherry-picked from #46218
Co-authored-by: daidai <[email protected]>
---
.../src/main/java/org/apache/doris/datasource/FileQueryScanNode.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/FileQueryScanNode.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/FileQueryScanNode.java
index 4a071fa6682..2fdd8b9de3a 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/datasource/FileQueryScanNode.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/datasource/FileQueryScanNode.java
@@ -340,7 +340,10 @@ public abstract class FileQueryScanNode extends
FileScanNode {
totalFileSize = fileSplit.getLength() * selectedSplitNum;
long maxWaitTime =
ConnectContext.get().getSessionVariable().getFetchSplitsMaxWaitTime();
// Not accurate, only used to estimate concurrency.
- int numSplitsPerBE = numApproximateSplits() /
backendPolicy.numBackends();
+ // Here, we must take the max of 1, because
+ // in the case of multiple BEs, `numApproximateSplits() /
backendPolicy.numBackends()` may be 0,
+ // and finally numSplitsPerBE is 0, resulting in no data being
queried.
+ int numSplitsPerBE = Math.max(numApproximateSplits() /
backendPolicy.numBackends(), 1);
for (Backend backend : backendPolicy.getBackends()) {
SplitSource splitSource = new SplitSource(backend,
splitAssignment, maxWaitTime);
splitSources.add(splitSource);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]