You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ja...@apache.org on 2014/06/20 22:25:00 UTC
[24/32] git commit: DRILL-1049: Handle few types missing in
ExpressionStringBuilder and ExpressionTreeMaterializer.castEqual
DRILL-1049: Handle few types missing in ExpressionStringBuilder and ExpressionTreeMaterializer.castEqual
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/4d13046d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/4d13046d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/4d13046d
Branch: refs/heads/master
Commit: 4d13046dddef73b960bbcba1958a2a262b1e02d6
Parents: 980dc87
Author: vkorukanti <ve...@gmail.com>
Authored: Fri Jun 20 10:04:11 2014 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Fri Jun 20 10:56:16 2014 -0700
----------------------------------------------------------------------
.../expression/ExpressionStringBuilder.java | 2 ++
.../exec/expr/ExpressionTreeMaterializer.java | 28 +++++++++++++-------
2 files changed, 20 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/4d13046d/common/src/main/java/org/apache/drill/common/expression/ExpressionStringBuilder.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/drill/common/expression/ExpressionStringBuilder.java b/common/src/main/java/org/apache/drill/common/expression/ExpressionStringBuilder.java
index 7d54b6b..edc1a53 100644
--- a/common/src/main/java/org/apache/drill/common/expression/ExpressionStringBuilder.java
+++ b/common/src/main/java/org/apache/drill/common/expression/ExpressionStringBuilder.java
@@ -247,7 +247,9 @@ public class ExpressionStringBuilder extends AbstractExprVisitor<Void, StringBui
switch(mt.getMinorType()){
case FLOAT4:
case FLOAT8:
+ case BIT:
case INT:
+ case TINYINT:
case SMALLINT:
case BIGINT:
case UINT1:
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/4d13046d/exec/java-exec/src/main/java/org/apache/drill/exec/expr/ExpressionTreeMaterializer.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/ExpressionTreeMaterializer.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/ExpressionTreeMaterializer.java
index 4594c43..18cd894 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/ExpressionTreeMaterializer.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/ExpressionTreeMaterializer.java
@@ -510,22 +510,30 @@ public class ExpressionTreeMaterializer {
case BIGINT:
case BIT:
case TINYINT:
+ case SMALLINT:
case UINT1:
case UINT2:
case UINT4:
case UINT8:
+ case TIME:
+ case TIMESTAMP:
+ case TIMESTAMPTZ:
+ case DATE:
+ case INTERVAL:
+ case INTERVALDAY:
+ case INTERVALYEAR:
// nothing else matters.
return true;
- case DECIMAL9:
- case DECIMAL18:
- case DECIMAL28DENSE:
- case DECIMAL28SPARSE:
- case DECIMAL38DENSE:
- case DECIMAL38SPARSE:
- if (to.getScale() == from.getScale() && to.getPrecision() == from.getPrecision()) {
- return true;
- }
- return false;
+ case DECIMAL9:
+ case DECIMAL18:
+ case DECIMAL28DENSE:
+ case DECIMAL28SPARSE:
+ case DECIMAL38DENSE:
+ case DECIMAL38SPARSE:
+ if (to.getScale() == from.getScale() && to.getPrecision() == from.getPrecision()) {
+ return true;
+ }
+ return false;
case FIXED16CHAR:
case FIXEDBINARY: