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-51438][SQL] Make CatalystDataToProtobuf and ProtobufDataToCatalyst properly comparable and hashable #50212

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vladimirg-db
Copy link
Contributor

What changes were proposed in this pull request?

Hand-roll equals and hashCode for CatalystDataToProtobuf and ProtobufDataToCatalyst.

Why are the changes needed?

CatalystDataToProtobuf and ProtobufDataToCatalyst have Array[Byte] in their case class fields, which makes them incomparable using the default-generated equals, because Array.equals performs reference comparison. We need to use Array.sameElements.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

New tests in ProtobufCatalystDataConversionSuite.

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

copilot.nvim

@vladimirg-db vladimirg-db force-pushed the vladimir-golubev_data/fix-comparison-or-protobuf-expressions branch from 23021f6 to ddc1396 Compare March 7, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant