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

    https://github.com/apache/incubator-flink/pull/263#discussion_r21689646
  
    --- Diff: 
flink-scala/src/main/java/org/apache/flink/api/scala/operators/ScalaAggregateOperator.java
 ---
    @@ -164,18 +160,8 @@ public ScalaAggregateOperator(Grouping<IN> input, 
Aggregations function, int fie
                }
                genName.setLength(genName.length()-1);
     
    -           TypeSerializer<IN> serializer = 
getInputType().createSerializer();
    -           TypeSerializerFactory<IN> serializerFactory;
    -           if (serializer.isStateful()) {
    -                   serializerFactory = new 
RuntimeStatefulSerializerFactory<IN>(
    -                                   serializer, 
getInputType().getTypeClass());
    -           } else {
    -                   serializerFactory = new 
RuntimeStatelessSerializerFactory<IN>(
    -                                   serializer, 
getInputType().getTypeClass());
    -           }
    -
                @SuppressWarnings("rawtypes")
    -           RichGroupReduceFunction<IN, IN> function = new 
AggregatingUdf(serializerFactory, aggFunctions, fields);
    +           RichGroupReduceFunction<IN, IN> function = new 
AggregatingUdf((TupleSerializerBase) getInputType().createSerializer(), 
aggFunctions, fields);
    --- End diff --
    
    Could we do explicit conversion from TypeSerializer to TupleSerializerBase 
instead of hard casting?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to