hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jd...@apache.org
Subject hive git commit: HIVE-15521: setRightValue() code generated using FilterColumnBetween.txt is incorrect (Jason Dere, reviewed by Matt McCline)
Date Tue, 10 Jan 2017 23:06:49 GMT
Repository: hive
Updated Branches:
  refs/heads/master b0ed8241a -> 93848252a


HIVE-15521: setRightValue() code generated using FilterColumnBetween.txt is incorrect (Jason
Dere, reviewed by Matt McCline)


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

Branch: refs/heads/master
Commit: 93848252a2cf576f8d8c3d55c9573485f52c3fab
Parents: b0ed824
Author: Jason Dere <jdere@hortonworks.com>
Authored: Tue Jan 10 15:06:22 2017 -0800
Committer: Jason Dere <jdere@hortonworks.com>
Committed: Tue Jan 10 15:06:22 2017 -0800

----------------------------------------------------------------------
 .../ExpressionTemplates/FilterColumnBetween.txt         |  2 +-
 .../vector/expressions/TestVectorFilterExpressions.java | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/93848252/ql/src/gen/vectorization/ExpressionTemplates/FilterColumnBetween.txt
----------------------------------------------------------------------
diff --git a/ql/src/gen/vectorization/ExpressionTemplates/FilterColumnBetween.txt b/ql/src/gen/vectorization/ExpressionTemplates/FilterColumnBetween.txt
index e9aaaf2..7c5615d 100644
--- a/ql/src/gen/vectorization/ExpressionTemplates/FilterColumnBetween.txt
+++ b/ql/src/gen/vectorization/ExpressionTemplates/FilterColumnBetween.txt
@@ -171,7 +171,7 @@ public class <ClassName> extends VectorExpression {
   }
 
   public void setRightValue(<OperandType> value) {
-    this.leftValue = value;
+    this.rightValue = value;
   }
   
   @Override

http://git-wip-us.apache.org/repos/asf/hive/blob/93848252/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorFilterExpressions.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorFilterExpressions.java
b/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorFilterExpressions.java
index 80f55dc..b4682f9 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorFilterExpressions.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorFilterExpressions.java
@@ -424,6 +424,18 @@ public class TestVectorFilterExpressions {
     expr1.evaluate(vrb3);
     assertEquals(0, vrb3.size);
 
+    // Test getters/setters
+    FilterLongColumnBetween betweenExpr = (FilterLongColumnBetween) expr1;
+    assertEquals(15, betweenExpr.getLeftValue());
+    assertEquals(17, betweenExpr.getRightValue());
+    assertEquals(0, betweenExpr.getColNum());
+
+    betweenExpr.setColNum(1);
+    assertEquals(1, betweenExpr.getColNum());
+    betweenExpr.setLeftValue(2);
+    assertEquals(2, betweenExpr.getLeftValue());
+    betweenExpr.setRightValue(3);
+    assertEquals(3, betweenExpr.getRightValue());
   }
 
   @Test


Mime
View raw message