[
https://issues.apache.org/jira/browse/FLINK-6764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16031183#comment-16031183
]
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_r119359879
--- 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 --
While the idea makes sense, I am not sure if we can rely on all serializer
having a correct implementation of equals and hash code that will do what we
want. We might be better of with collection of `serializer -> index` pairs and
using equality for deduplication, but even there equals might be tricky. While
it is ok to accidentally write serializer twice, it should never happen that a
serializer gets de-duplicated by accident.
> 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)