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-46937][SQL][FOLLOWUP] Properly check registered function replacement #46876

Closed
wants to merge 1 commit into from

Conversation

cloud-fan
Copy link
Contributor

What changes were proposed in this pull request?

A followup of #44976 . ConcurrentHashMap#put has a different semantic than the scala map, and it returns null if the key is new. We should update the checking code accordingly.

Why are the changes needed?

avoid wrong warning messages

Does this PR introduce any user-facing change?

no

How was this patch tested?

manual

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

no

@github-actions github-actions bot added the SQL label Jun 5, 2024
@cloud-fan
Copy link
Contributor Author

@@ -222,7 +222,7 @@ trait SimpleFunctionRegistryBase[T] extends FunctionRegistryBase[T] with Logging
builder: FunctionBuilder): Unit = {
val newFunction = (info, builder)
functionBuilders.put(name, newFunction) match {
case previousFunction if previousFunction != newFunction =>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is hurting our CI as it generates a lof of warning messages.

@yaooqinn yaooqinn closed this in 88b8dc2 Jun 5, 2024
@yaooqinn
Copy link
Member

yaooqinn commented Jun 5, 2024

Thank you @cloud-fan @HyukjinKwon
Merged to master

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

Successfully merging this pull request may close these issues.

3 participants