Github user StefanRRichter commented on a diff in the pull request:
https://github.com/apache/flink/pull/6196#discussion_r199894398
--- Diff:
flink-core/src/main/java/org/apache/flink/api/common/typeutils/CompositeSerializer.java
---
@@ -272,4 +254,60 @@ public int getVersion() {
previousSerializersAndConfigs.get(index).f0,
UnloadableDummyTypeSerializer.class,
previousSerializersAndConfigs.get(index).f1,
fieldSerializers[index]);
}
+
+ /** This class holds composite serializer parameters which can be
precomputed in advanced for better performance. */
+ protected static class PrecomputedParameters implements Serializable {
+ /** Whether target type is immutable. */
+ final boolean immutableTargetType;
+
+ /** Whether target type and its fields are immutable. */
+ final boolean immutable;
+
+ /** Byte length of target object in serialized form. */
+ private final int length;
+
+ /** Whether any field serializer is stateful. */
+ final boolean stateful;
+
+ final int hashCode;
--- End diff --
I wonder if this should be `transient` in a serializable class, the hash
code could be based on object identity.
---