Interface WindowGroupedTable

    • Method Detail

      • select

        Table select​(Expression... fields)
        Performs a selection operation on a window grouped table. Similar to an SQL SELECT statement. The field expressions can contain complex expressions and aggregations.

        Example:

        
         windowGroupedTable.select($("key"), $("window").start(), $("value").avg().as("valavg"));
         

        Scala Example:

        
         windowGroupedTable.select('key, 'window.start, 'value.avg as 'valavg)
         
      • aggregate

        AggregatedTable aggregate​(Expression aggregateFunction)
        Performs an aggregate operation on a window grouped table. You have to close the aggregate(Expression) with a select statement. The output will be flattened if the output type is a composite type.

        Example:

        
         windowGroupedTable.aggregate(call(MyAggregateFunction.class, $("a"), $("b")).as("x", "y", "z"))
           .select($("key"), $("window").start(), $("x"), $("y"), $("z"));
         

        Scala Example:

        
         val aggFunc = new MyAggregateFunction
         windowGroupedTable
           .aggregate(aggFunc('a, 'b) as ('x, 'y, 'z))
           .select('key, 'window.start, 'x, 'y, 'z)
         
      • flatAggregate

        FlatAggregateTable flatAggregate​(Expression tableAggregateFunction)
        Performs a flatAggregate operation on a window grouped table. FlatAggregate takes a TableAggregateFunction which returns multiple rows. Use a selection after flatAggregate.

        Example:

        
         windowGroupedTable.flatAggregate(call(MyTableAggregateFunction.class, $("a"), $("b")).as("x", "y", "z"))
           .select($("key"), $("window").start(), $("x"), $("y"), $("z"));
         

        Scala Example:

        
         val tableAggFunc = new MyTableAggregateFunction
         windowGroupedTable
           .flatAggregate(tableAggFunc('a, 'b) as ('x, 'y, 'z))
           .select('key, 'window.start, 'x, 'y, 'z)