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

ASF GitHub Bot commented on FLINK-2968:
---------------------------------------

GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/1328

    [FLINK-2968] [streaming] Let AbstractUdfStreamOperator forward output type 
information to WindowFunction

    The fold operation needs the output type information to serialize the 
initial value of it. Therefore, the OutputTypeConfigurable interface was 
defined. It is called by the StreamGraph upon adding a StreamOperator to the 
StreamGraph. Since some stream operators, such as the window stream operator, 
don't work directly on the data, but instead call a WindowFunction for the 
actual logic, the output type information has to be forwarded to this function 
to set output type information at the right place.
    
    Thus, the AbstractUdfStreamOperator checks whether its udf function 
supports the OutputTypeConfigurable interface. If this is the case, then it 
forwards the output type information to the udf.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink fixWindowFoldOperation

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1328.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1328
    
----
commit 0672130514974a6be4e7b6ebf75354d1884dd5c2
Author: Till Rohrmann <[email protected]>
Date:   2015-11-04T15:39:13Z

    [FLINK-2968] [streaming] Let AbstractUdfStreamOperator forward output type 
information to WindowFunction
    
    The fold operation needs the output type information to serialize the 
initial value of it. Therefore, the OutputTypeConfigurable interface was 
defined. It is called by the StreamGraph upon adding a StreamOperator to the 
StreamGraph. Since some stream operators, such as the window stream operator, 
don't work directly on the data, but instead call a WindowFunction for the 
actual logic, the output type information has to be forwarded to this function 
to set output type information at the right place.
    
    Thus, the AbstractUdfStreamOperator checks whether its udf function 
supports the OutputTypeConfigurable interface. If this is the case, then it 
forwards the output type information to the udf.

----


> Windowed fold operation fails because the initial value was not serialized
> --------------------------------------------------------------------------
>
>                 Key: FLINK-2968
>                 URL: https://issues.apache.org/jira/browse/FLINK-2968
>             Project: Flink
>          Issue Type: Bug
>    Affects Versions: 0.10
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>
> The windowed fold operation currently fails because the initial value was not 
> serialized. The reason for this is that the fold operation is realized as a 
> {{WindowFunction}} within an {{AbstractUdfStreamOperator}} and does not get 
> the output type information forwarded (which is necessary for the 
> serialization). 
> The solution is to let the {{AbstractUdfStreamOperator}} forward the output 
> type information to the {{WindowFunction}} if it implements the 
> {{OutputTypeConfigurable}} interface.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to