kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lid...@apache.org
Subject kylin git commit: KYLIN-2085 Consider dynamicVariables in CompareTupleFilter operator swap
Date Wed, 12 Oct 2016 08:33:22 GMT
Repository: kylin
Updated Branches:
  refs/heads/yang21 5a1145853 -> c1ad4491e


KYLIN-2085 Consider dynamicVariables in CompareTupleFilter operator swap


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/c1ad4491
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/c1ad4491
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/c1ad4491

Branch: refs/heads/yang21
Commit: c1ad4491e071592821df991029210f85dc54c4ae
Parents: 5a11458
Author: lidongsjtu <lidong@apache.org>
Authored: Wed Oct 12 13:44:11 2016 +0800
Committer: lidongsjtu <lidong@apache.org>
Committed: Wed Oct 12 16:33:13 2016 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/metadata/filter/CompareTupleFilter.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/c1ad4491/core-metadata/src/main/java/org/apache/kylin/metadata/filter/CompareTupleFilter.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/CompareTupleFilter.java
b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/CompareTupleFilter.java
index fe51710..c7a3721 100644
--- a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/CompareTupleFilter.java
+++ b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/CompareTupleFilter.java
@@ -75,7 +75,8 @@ public class CompareTupleFilter extends TupleFilter {
             }
             this.column = columnFilter.getColumn();
             // if value is before column, we need to reverse the operator. e.g. "1 >=
c1" => "c1 <= 1"
-            if (!this.conditionValues.isEmpty() && needSwapOperator()) {
+            // children.size() > 1 means already added one conditionValue or dynamicVariable
+            if (this.children.size() > 1 && needSwapOperator()) {
                 this.operator = SWAP_OP_MAP.get(this.operator);
                 TupleFilter last = this.children.remove(this.children.size() - 1);
                 this.children.add(0, last);


Mime
View raw message