Skip to content

[Scala] Fix scala collection serialization nested in pojo#1140

Merged
theweipeng merged 1 commit intoapache:mainfrom
chaokunyang:fix_scala_collection_serialization
Nov 24, 2023
Merged

[Scala] Fix scala collection serialization nested in pojo#1140
theweipeng merged 1 commit intoapache:mainfrom
chaokunyang:fix_scala_collection_serialization

Conversation

@chaokunyang
Copy link
Collaborator

What do these changes do?

When a class contains a field of scala list/map type, fury will returna ReplaceResolver serializer if io.fury.serializer.scala.ScalaDispatcher is not set, which will serializer CastException, since we assume all map/collection serializers all extends AbstractMapSerializer/AbstractCollectionSerializer
Fix scala collection serialization nested in pojo

Related issue number

Closes #1137

Check code requirements

  • tests added / passed (if needed)
  • Ensure all linting tests pass, see here for how to run them

Copy link
Member

@theweipeng theweipeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@theweipeng theweipeng merged commit bf59376 into apache:main Nov 24, 2023
@ghostdogpr
Copy link

It is still failing if you pass an empty collection

@chaokunyang
Copy link
Collaborator Author

@ghostdogpr I created a new issue for this bug in #1157, it will raise error too if you pass a singleton map object. This is uncommon in java, we missed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Scala] Serialization exception when a class contains a List

3 participants