Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-48708][CORE] Remove three unnecessary type registrations from KryoSerializer #47080

Closed
wants to merge 3 commits into from

Conversation

LuciferYang
Copy link
Contributor

@LuciferYang LuciferYang commented Jun 25, 2024

What changes were proposed in this pull request?

This pr aims to remove three unnecessary type registrations from KryoSerializer, they include None, Nil, and scala.collection.immutable.$colon$colon .

Why are the changes needed?

The types that have been cleaned up are already registered in ScalaKryoInstantiator, so there is no need to register them again in Spark.

https://github.com/twitter/chill/blame/0a34e50f742ab74598c81f153cfe8ad90bf3a859/chill-scala/src/main/scala/com/twitter/chill/ScalaKryoInstantiator.scala#L238-L241

  None.getClass, // None
  classOf[Queue[_]], 
  Nil.getClass, // Nil
  classOf[::[_]], // scala.collection.immutable.$colon$colon

Does this PR introduce any user-facing change?

No

How was this patch tested?

Exist test: "Bug: SPARK-10251" in org.apache.spark.serializer.KryoSerializerSuite

Was this patch authored or co-authored using generative AI tooling?

No

@LuciferYang LuciferYang marked this pull request as draft June 25, 2024 05:45
@github-actions github-actions bot added the CORE label Jun 25, 2024
@LuciferYang
Copy link
Contributor Author

LuciferYang commented Jun 25, 2024

@LuciferYang LuciferYang changed the title [WIP] Remove unnecessary Kryo type registrations [SPARK-48708][CORE] Remove three unnecessary type registrations from KryoSerializer Jun 25, 2024
@LuciferYang LuciferYang marked this pull request as ready for review June 25, 2024 06:05
@LuciferYang
Copy link
Contributor Author

cc @yaooqinn

Copy link
Member

@yaooqinn yaooqinn left a comment

Choose a reason for hiding this comment

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

Looks a safe removal to me

@yaooqinn yaooqinn closed this in baf461b Jun 27, 2024
@yaooqinn
Copy link
Member

Merged to master. Thank you @LuciferYang

@LuciferYang
Copy link
Contributor Author

Thanks @yaooqinn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants