flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From twal...@apache.org
Subject flink git commit: [FLINK-4385] [table] Union on Timestamp fields does not work
Date Mon, 15 Aug 2016 07:28:33 GMT
Repository: flink
Updated Branches:
  refs/heads/master 79cc30f3d -> 83c4b9707


[FLINK-4385] [table] Union on Timestamp fields does not work

This closes #2362.


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

Branch: refs/heads/master
Commit: 83c4b9707dd24425391bd5759f12878ad2f19175
Parents: 79cc30f
Author: Jark Wu <wuchong.wc@alibaba-inc.com>
Authored: Fri Aug 12 17:48:23 2016 +0800
Committer: twalthr <twalthr@apache.org>
Committed: Mon Aug 15 09:27:14 2016 +0200

----------------------------------------------------------------------
 .../apache/flink/api/table/plan/nodes/dataset/DataSetRel.scala  | 5 ++++-
 .../org/apache/flink/api/table/typeutils/IntervalTypeInfo.scala | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/83c4b970/flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/nodes/dataset/DataSetRel.scala
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/nodes/dataset/DataSetRel.scala
b/flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/nodes/dataset/DataSetRel.scala
index 08e0c41..9ce1580 100644
--- a/flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/nodes/dataset/DataSetRel.scala
+++ b/flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/nodes/dataset/DataSetRel.scala
@@ -62,7 +62,10 @@ trait DataSetRel extends RelNode with FlinkRel {
         case SqlTypeName.VARCHAR => s + 12
         case SqlTypeName.CHAR => s + 1
         case SqlTypeName.DECIMAL => s + 12
-        case _ => throw new TableException("Unsupported data type encountered")
+        case SqlTypeName.INTERVAL_DAY_TIME => s + 8
+        case SqlTypeName.INTERVAL_YEAR_MONTH => s + 4
+        case SqlTypeName.TIME | SqlTypeName.TIMESTAMP | SqlTypeName.DATE => s + 12
+        case _ => throw TableException(s"Unsupported data type encountered: $t")
       }
     }
 

http://git-wip-us.apache.org/repos/asf/flink/blob/83c4b970/flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/typeutils/IntervalTypeInfo.scala
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/typeutils/IntervalTypeInfo.scala
b/flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/typeutils/IntervalTypeInfo.scala
index 85524fb..bf5cb58 100644
--- a/flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/typeutils/IntervalTypeInfo.scala
+++ b/flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/typeutils/IntervalTypeInfo.scala
@@ -97,7 +97,7 @@ object IntervalTypeInfo {
       ascendingOrder: java.lang.Boolean)
     : TypeComparator[X] = {
     try {
-      val constructor = comparatorClass.getConstructor(classOf[java.lang.Boolean])
+      val constructor = comparatorClass.getConstructor(java.lang.Boolean.TYPE)
       constructor.newInstance(ascendingOrder)
     } catch {
       case e: Exception =>


Mime
View raw message