gearpump-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEARPUMP-316) Don't enforce groupBy after window
Date Wed, 07 Jun 2017 03:21:18 GMT

    [ https://issues.apache.org/jira/browse/GEARPUMP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040086#comment-16040086
] 

ASF GitHub Bot commented on GEARPUMP-316:
-----------------------------------------

Github user huafengw commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/186#discussion_r120526897
  
    --- Diff: streaming/src/main/scala/org/apache/gearpump/streaming/dsl/window/api/WindowFunction.scala
---
    @@ -32,35 +32,34 @@ object WindowFunction {
       }
     }
     
    -trait WindowFunction[T] {
    +trait WindowFunction {
     
    -  def apply(context: WindowFunction.Context[T]): Array[Window]
    +  def apply[T](context: WindowFunction.Context[T]): Array[Window]
     
       def isNonMerging: Boolean
     }
     
    -abstract class NonMergingWindowFunction[T] extends WindowFunction[T] {
    +abstract class NonMergingWindowFunction extends WindowFunction {
     
       override def isNonMerging: Boolean = true
     }
     
    -case class GlobalWindowFunction[T]() extends NonMergingWindowFunction[T] {
    +case class GlobalWindowFunction() extends NonMergingWindowFunction {
     
    -  override def apply(context: WindowFunction.Context[T]): Array[Window] = {
    +  override def apply[T](context: WindowFunction.Context[T]): Array[Window] = {
         Array(Window(Instant.ofEpochMilli(MIN_TIME_MILLIS),
    --- End diff --
    
    We can create just one static object, no need to create one each time as it's immutable.


> Don't enforce groupBy after window
> ----------------------------------
>
>                 Key: GEARPUMP-316
>                 URL: https://issues.apache.org/jira/browse/GEARPUMP-316
>             Project: Apache Gearpump
>          Issue Type: Sub-task
>          Components: streaming
>            Reporter: Manu Zhang
>            Assignee: Manu Zhang
>
> Return a normal Stream instead of WindowStream on window function. Window function defines
a boundary (window) for elements and the following operations should fall in corresponding
boundaries. The boundary should not change until a new window function is defined. The default
boundary is the {{GlobalWindows}} if not defined.
> This means there will be a window context for each underlying task. Elements are emitted
in terms of the trigger semantics. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message