Skip to content

test: pin merge_insert of a source holding both float zeros - #86

Closed
slachiewicz wants to merge 2 commits into
rerun-io:chore/datafusion-55from
slachiewicz:agent/review-9979
Closed

slachiewicz wants to merge 2 commits into
rerun-io:chore/datafusion-55from
slachiewicz:agent/review-9979

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Oct 14, 2026 •

Copy link
Copy Markdown

Follow-up to my review of lance-format#9979, for you to pull in if useful.

  • test_merge_insert_source_with_both_float_zeros pins the new signed-zero behaviour from the source side: a source holding both -0.0 and +0.0 is one key twice, so the default SourceDedupeBehavior::Fail rejects it as an ambiguous merge and FirstSeen updates each zero row once (with either source value, depending on join order). Both use_index settings are covered.
  • A comment in compact_blank_source says why its validating take is safe: the row comes from storage, and the map decoder already builds maps with MapArray::try_new (lance-encoding/src/encodings/logical/map.rs:229).
  • key_values_probes_both_zero_encodings pins that a float zero join key is probed under both encodings in MapIndexExec::key_values: the zero row yields two values, so four rows give five values without dedupe and four with it, and an integer zero or NaN is not expanded.

Verified: cargo test -p lance --lib for the three tests on ubuntu-24.04 → 7 passed, cargo fmt -p lance -- --check clean (run).

-0.0 and +0.0 are one key now, so a source holding both matches each zero
target row twice: Fail rejects it as ambiguous, FirstSeen updates each once.
Also note in compact_blank_source why its validating take is safe.
@github-actions github-actions Bot added the chore label Oct 14, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review October 18, 2026 10:19
@timsaucer

Copy link
Copy Markdown
Member

Thanks! I've pulled those commits in during my merge, so closing this PR now that I have them on the branch. I really appreciate it!

@timsaucer timsaucer closed this Oct 20, 2026
@slachiewicz
slachiewicz deleted the agent/review-9979 branch October 20, 2026 16:34
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.

2 participants