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 2020/11/22 12:49:28 UTC

[incubator-doris] branch master updated: [Bug] Avoid partition prune if predicate is not with SlotRef (#4833) (#4921)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new c28769c  [Bug] Avoid partition prune if predicate is not with SlotRef (#4833) (#4921)
c28769c is described below

commit c28769c5127563f49b1ff4c738eed880a11f04a5
Author: ccoffline <45...@users.noreply.github.com>
AuthorDate: Sun Nov 22 20:49:20 2020 +0800

    [Bug] Avoid partition prune if predicate is not with SlotRef (#4833) (#4921)
---
 .../src/main/java/org/apache/doris/planner/SingleNodePlanner.java    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java b/fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java
index 98d05e8..ac34505 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java
@@ -960,10 +960,9 @@ public class SingleNodePlanner {
                 if (!inPredicate.isLiteralChildren() || inPredicate.isNotIn()) {
                     continue;
                 }
-                if (inPredicate.getChild(0).unwrapExpr(false) instanceof LiteralExpr) {
-                    // If child(0) of the in predicate is a constant expression,
+                if (!(inPredicate.getChild(0).unwrapExpr(false) instanceof SlotRef)) {
+                    // If child(0) of the in predicate is not a SlotRef,
                     // then other children of in predicate should not be used as a condition for partition prune.
-                    // Such as "where  'Hi' in ('Hi', 'hello') and ... "
                     continue;
                 }
                 if (null == partitionColumnFilter) {


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