arrow-ord: Comparison for struct
- Dominant language
- Rust
- Stars
- 3.6k
- Forks
- 1.3k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 167
Description
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
**Describe the solution you'd like**
similar to #5407 but for struct
We can have `eq` first which fix https://github.com/apache/arrow-datafusion/issues/9254
Pass this test
```rust
#[test]
fn test_struct_ord() {
let s1 = StructArray::try_from(vec![
(
"a",
Arc::new(Int32Array::from(vec![1, 2, 3, 4, 5])) as Arc,
),
(
"b",
Arc::new(Float32Array::from(vec![1.0, 2.0, 3.0, 4.0, 5.0])) as Arc,
)
]).unwrap();
let s2 = StructArray::try_from(vec![
(
"a",
Arc::new(Int32Array::from(vec![1, 2, 3, 4, 5])) as Arc,
),
(
"b",
Arc::new(Float32Array::from(vec![1.0, 2.0, 3.0, 4.0, 5.0])) as Arc,
)
]).unwrap();
let res = eq(&s1, &s2).unwrap();
println!("res: {:?}", res);
}
```
**Describe alternatives you've considered**
**Additional context**
Contributor guide
Research direction
Start by locating the arrow-ord implementation of eq and its handling for StructArray, then use the test_struct_ord example from the issue as the starting test. Compare the result for the two identical structs and make the test pass with struct comparison support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100