This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new f0e883c968a [Fix](executor)Fix backend_active_tasks only scan one be 
(#35490)
f0e883c968a is described below

commit f0e883c968a231477f770655e4e5e5e7700bc8a0
Author: wangbo <wan...@apache.org>
AuthorDate: Tue May 28 11:48:42 2024 +0800

    [Fix](executor)Fix backend_active_tasks only scan one be (#35490)
    
    ## Proposed changes
    Fix ```select * from backend_active_tasks``` but only return one random
    be info.
---
 .../apache/doris/planner/BackendPartitionedSchemaScanNode.java   | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/planner/BackendPartitionedSchemaScanNode.java
 
b/fe/fe-core/src/main/java/org/apache/doris/planner/BackendPartitionedSchemaScanNode.java
index dc57b67d98a..803afe05d8d 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/planner/BackendPartitionedSchemaScanNode.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/planner/BackendPartitionedSchemaScanNode.java
@@ -55,10 +55,17 @@ import java.util.Set;
 public class BackendPartitionedSchemaScanNode extends SchemaScanNode {
 
     public static final Set<String> BACKEND_TABLE = new HashSet<>();
+    // NOTE: when add a new schema table for BackendPartitionedSchemaScanNode,
+    // you need to the table's backend column id name to BACKEND_ID_COLUMN_SET
+    // it's used to backend pruner, see computePartitionInfo;
+    public static final Set<String> BEACKEND_ID_COLUMN_SET = new HashSet<>();
 
     static {
         BACKEND_TABLE.add("rowsets");
+        BEACKEND_ID_COLUMN_SET.add("backend_id");
+
         BACKEND_TABLE.add("backend_active_tasks");
+        BEACKEND_ID_COLUMN_SET.add("be_id");
     }
 
     public static boolean isBackendPartitionedSchemaTable(String tableName) {
@@ -130,7 +137,7 @@ public class BackendPartitionedSchemaScanNode extends 
SchemaScanNode {
     private void computePartitionInfo() throws AnalysisException {
         List<Column> partitionColumns = new ArrayList<>();
         for (SlotDescriptor slotDesc : desc.getSlots()) {
-            if ("BACKEND_ID".equalsIgnoreCase(slotDesc.getColumn().getName())) 
{
+            if 
(BEACKEND_ID_COLUMN_SET.contains(slotDesc.getColumn().getName().toLowerCase())) 
{
                 partitionColumns.add(slotDesc.getColumn());
                 break;
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to