[
https://issues.apache.org/jira/browse/FLINK-18631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flink Jira Bot updated FLINK-18631:
-----------------------------------
Labels: auto-deprioritized-major auto-deprioritized-minor performance
pull-request-available (was: auto-deprioritized-major performance
pull-request-available stale-minor)
Priority: Not a Priority (was: Minor)
This issue was labeled "stale-minor" 7 days ago and has not received any
updates so it is being deprioritized. If this ticket is actually Minor, please
raise the priority and ask a committer to assign you the issue or revive the
public discussion.
> Serializer for scala sealed trait hierarchies
> ---------------------------------------------
>
> Key: FLINK-18631
> URL: https://issues.apache.org/jira/browse/FLINK-18631
> Project: Flink
> Issue Type: Improvement
> Components: API / Type Serialization System
> Affects Versions: 1.11.0
> Reporter: Roman Grebennikov
> Priority: Not a Priority
> Labels: auto-deprioritized-major, auto-deprioritized-minor,
> performance, pull-request-available
>
> Currently, when flink serialization system spots an ADT-style class hierarchy
> in the Scala code, it falls back to GenericType and kryo serialization, which
> may introduce performance issues. For example, for code:
> {{sealed trait ADT}}
> {{case class Foo(a: String) extends ADT}}
> {{case class Bar(b: Int) extends ADT}}
> {{env.fromCollection(List[ADT](Foo("a"),Bar(1))).collect()}}
>
> It will fall back to Kryo even if there is no problem with dealing with
> List[Foo] or List[Bar] separately. Using ADTs is a convenient way in Scala to
> model different types of messages, but Flink type system performance limits
> it to only a non performance-critical paths.
>
> It would be nice to have a sealed trait hierarchies support out of the box
> without kryo fallback.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)