Repository navigation
Conversation
rich7420
reviewed
Oct 17, 2026
Contributor
There was a problem hiding this comment.
Could we add expect_native tests for hash/xxhash64 with NULL and nullable structs containing a NullType field? Also cover round-robin with NULL and both ANSI intervals, positional placement disabled, a native exchange assertion, and full result comparison against Spark.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #7063.
Rationale for this change
The native Murmur3 and xxHash64 kernels had no arm for
Null,Interval(YearMonth)orDuration(Microsecond), sohash(a, null),xxhash64(a, null)and native round-robin shuffle over those types failed withUnsupported data type in hasher.What changes are included in this PR?
create_hashes_internal!hashesInterval(YearMonth)as an int andDuration(Microsecond)as a long, as Spark does forYearMonthIntervalTypeandDayTimeIntervalType, and leaves the hash unchanged forNull. This covers both the hash expressions and round-robin partitioning, since they share the kernel.child_with_parent_nullsnow returns aNullchild as is. Without that, hashing a null struct that has aNullTypefield still panicked once theNullarm was in place, because aNullArraycan't carry a null buffer (NullArray data should not contain a null buffer).I left
hash.scalaalone, sohash/xxhash64over the ANSI interval types still fall back to Spark. Enabling them there could be a follow-up now that the kernel handles them.How are these changes tested?
New unit tests in
murmur3.rsandxxhash64.rs: both interval types hash to the same values as the existingInt32/Int64cases, and aNullcolumn or aNullTypestruct field (including under a null struct) leaves the hash unchanged. A unit test instruct_nulls.rscovers theNullchild. I ran the native tests for the two changed crates; I did not run the Spark/JVM suites.AI disclosure: the change, the tests and this description were written with an AI coding assistant.