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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to