drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meh...@apache.org
Subject [4/5] drill git commit: DRILL-1884: Fix type cast rules to cast varbinary to timestamp
Date Thu, 18 Dec 2014 04:38:15 GMT
DRILL-1884: Fix type cast rules to cast varbinary to timestamp


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

Branch: refs/heads/master
Commit: 5c87674bf1a677d9078e9ec7e52d97baad918a76
Parents: a162191
Author: Mehant Baid <mehantr@gmail.com>
Authored: Tue Dec 16 09:25:26 2014 -0800
Committer: Mehant Baid <mehantr@gmail.com>
Committed: Wed Dec 17 18:54:14 2014 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/drill/exec/resolver/TypeCastRules.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/5c87674b/exec/java-exec/src/main/java/org/apache/drill/exec/resolver/TypeCastRules.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/resolver/TypeCastRules.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/resolver/TypeCastRules.java
index b18aebf..f5b0de4 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/resolver/TypeCastRules.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/resolver/TypeCastRules.java
@@ -413,6 +413,9 @@ public class TypeCastRules {
 
     /** TIMESTAMP cast able from **/
     rule = new HashSet<MinorType>();
+    rule.add(MinorType.VAR16CHAR);
+    rule.add(MinorType.VARCHAR);
+    rule.add(MinorType.VARBINARY);
     rule.add(MinorType.TIMESTAMP);
     rule.add(MinorType.TINYINT);
     rule.add(MinorType.SMALLINT);
@@ -722,7 +725,6 @@ public class TypeCastRules {
     rule.add(MinorType.DECIMAL38SPARSE);
     rule.add(MinorType.DECIMAL38DENSE);
     rule.add(MinorType.MONEY);
-    rule.add(MinorType.TIMESTAMPTZ);
     rule.add(MinorType.FLOAT4);
     rule.add(MinorType.FLOAT8);
     rule.add(MinorType.BIT);
@@ -758,6 +760,7 @@ public class TypeCastRules {
     rule.add(MinorType.DECIMAL38SPARSE);
     rule.add(MinorType.DECIMAL38DENSE);
     rule.add(MinorType.MONEY);
+    rule.add(MinorType.TIMESTAMP);
     rule.add(MinorType.TIMESTAMPTZ);
     rule.add(MinorType.FLOAT4);
     rule.add(MinorType.FLOAT8);


Mime
View raw message