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

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

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

    https://github.com/apache/flink/pull/4026#discussion_r119364516
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/api/common/typeutils/CompositeTypeSerializerConfigSnapshot.java
 ---
    @@ -110,4 +123,20 @@ public boolean equals(Object obj) {
        public int hashCode() {
                return nestedSerializersAndConfigs.hashCode();
        }
    +
    +   private Map<TypeSerializer<?>, Integer> buildSerializerIndices() {
    --- End diff --
    
    I see that the concrete implementation is always an identity hash map. 
since it behaves different from what you expect by a normal map (using 
equals/hashcode) and in that sense violates LSP, I suggest you wrap it in an 
own class called `SerializerIndex`.


> Deduplicate stateless TypeSerializers when serializing composite 
> TypeSerializers
> --------------------------------------------------------------------------------
>
>                 Key: FLINK-6764
>                 URL: https://issues.apache.org/jira/browse/FLINK-6764
>             Project: Flink
>          Issue Type: Improvement
>          Components: Type Serialization System
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Till Rohrmann
>            Assignee: Tzu-Li (Gordon) Tai
>
> Composite type serializer, such as the {{PojoSerializer}}, could be improved 
> by deduplicating stateless {{TypeSerializer}} when being serialized. This 
> would decrease their serialization size.



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

Reply via email to