Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Jan 23, 2026

Which issue does this PR close?

Rationale for this change

While (posthumously) reviewing #9250 from @Dandandan and @zhuqi-lucas I noticed that some of the special case branches are not covered.

What changes are included in this PR?

Add some more tests to cover all the special cases

Are these changes tested?

Yes, only tests

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jan 23, 2026
@alamb alamb force-pushed the alamb/more_tests_232 branch from bf12f4b to aaeb282 Compare January 23, 2026 19:57
@alamb alamb changed the title Alamb/more tests 232 Add additional coverage for StringViewArray comparisons Jan 23, 2026
let b = arrow_array::StringViewArray::from(vec![Some("ac")]);
assert!(!has_buffers(&a));
assert!(!has_buffers(&b));
assert_eq!(compare_byte_view(&a, 0, &b, 0), Ordering::Less);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these tests feel redundant to me, but there are multiple paths through the comparison code (elg ArrayOrd::is_lt vs lt so we need to write multiple tests to cover them

@alamb alamb marked this pull request as ready for review January 23, 2026 20:28
@Dandandan Dandandan merged commit 096751f into apache:main Jan 24, 2026
19 checks passed
@Dandandan
Copy link
Contributor

Thank you @alamb, I agree this was missing quite a bit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants