You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2021/11/12 03:47:13 UTC

[incubator-doris] 08/09: [BUG] Fix CacheAnalyzer's bug when aggregate column contains expression. (#7085)

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

morningman pushed a commit to branch branch-0.15
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git

commit 130ed3557b8240d266d4b1e01d7d689e65b4b820
Author: 曹建华 <ca...@bytedance.com>
AuthorDate: Fri Nov 12 10:54:24 2021 +0800

    [BUG] Fix CacheAnalyzer's bug when aggregate column contains expression. (#7085)
    
    When partition_cache is enabled, if Query's aggregate columns contain expression,
    CacheAnalyzer may throw exception and causes the query to fail.
---
 fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheAnalyzer.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheAnalyzer.java b/fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheAnalyzer.java
index e651d00..f2c88df 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheAnalyzer.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheAnalyzer.java
@@ -399,6 +399,10 @@ public class CacheAnalyzer {
             groupbyCount += 1;
             boolean matched = false;
             for (Expr groupExpr : groupExprs) {
+                if (!(groupExpr instanceof SlotRef)) {
+                    continue;
+                }
+
                 SlotRef slot = (SlotRef) groupExpr;
                 if (partColumn.getName().equals(slot.getColumnName())) {
                     matched = true;

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