flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request #2562: [FLINK-4691] [table] Add group-windows for streami...
Date Wed, 12 Oct 2016 09:57:57 GMT
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2562#discussion_r82968570
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/typeutils/TimeIntervalTypeInfo.scala
---
    @@ -24,14 +24,14 @@ import org.apache.flink.api.common.ExecutionConfig
     import org.apache.flink.api.common.typeinfo.{AtomicType, TypeInformation}
     import org.apache.flink.api.common.typeutils.base.{IntComparator, IntSerializer, LongComparator,
LongSerializer}
     import org.apache.flink.api.common.typeutils.{TypeComparator, TypeSerializer}
    -import org.apache.flink.api.table.typeutils.IntervalTypeInfo.instantiateComparator
    +import org.apache.flink.api.table.typeutils.TimeIntervalTypeInfo.instantiateComparator
     import org.apache.flink.util.Preconditions._
     
     /**
       * TypeInformation for SQL INTERVAL types.
       */
     @SerialVersionUID(-1816179424364825258L)
    -class IntervalTypeInfo[T](
    +class TimeIntervalTypeInfo[T](
    --- End diff --
    
    Define `TimeIntervalTypeInfo` as 
    ```
    class TimeIntervalTypeInfo[T](
        val clazz: Class[T],
        val serializer: TypeSerializer[T],
        val comparatorClazz: Class[_ <: TypeComparator[T]])
      extends IntegerTypeInfo[T](
        clazz,
        Array[Class[_]](classOf[Float], classOf[Double], classOf[Character]),
        serializer,
        comparatorClazz)
    
    object TimeIntervalTypeInfo {
    
      val INTERVAL_MONTHS = new TimeIntervalTypeInfo(
        classOf[java.lang.Integer],
        IntSerializer.INSTANCE,
        classOf[IntComparator])
    
      val INTERVAL_MILLIS = new TimeIntervalTypeInfo(
        classOf[java.lang.Long],
        LongSerializer.INSTANCE,
        classOf[LongComparator])
    
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message