Class KeyedWindowOperator

    • Constructor Summary

      Constructors 
      Constructor Description
      KeyedWindowOperator​(@NonNull Operator childOperator, @NonNull WindowDefinition windowDefinition, @NonNull Query query)
      Create a new KeyedWindowOperator and set the window definition to define the extent of the window.
    • Constructor Detail

      • KeyedWindowOperator

        public KeyedWindowOperator​(@NonNull Operator childOperator,
                                   @NonNull WindowDefinition windowDefinition,
                                   @NonNull Query query)
                            throws java.lang.IllegalArgumentException
        Create a new KeyedWindowOperator and set the window definition to define the extent of the window.
        Parameters:
        childOperator - The previous operator in the operator chain of query.
        windowDefinition - The window definition.
        query - The Query instance on which Query.window(stream.nebula.operators.window.WindowDefinition) was called.
        Throws:
        java.lang.IllegalArgumentException - If windowDefinition is null.
    • Method Detail

      • getWindowDefinition

        public WindowDefinition getWindowDefinition()
        Access the window definition.
        Returns:
        The window definition.
      • setKeyFields

        protected void setKeyFields​(@NonNull java.util.List<java.lang.String> keyFields)
        Set the stream attribute names on which the window is grouped.

        This method is protected so that it can only be called in WindowOperator but not from the Query API.

        Parameters:
        keyFields - The grouping key names.
      • getKeyFields

        public java.util.List<java.lang.String> getKeyFields()
        Access the attribute names on which the window is grouped.
        Returns:
        The grouping key names.
      • getAggregations

        public java.util.List<Aggregation> getAggregations()
        Access the window aggregation functions.
        Returns:
        A list of Aggregation instances for this window.