Skip to content

Interval Negation Incorrect #4488

@tustvold

Description

@tustvold

Describe the bug

The negate kernels are incorrect for interval types as they fail to take into account that the values are composite

To Reproduce

#[test]
fn test_negate() {
    let a =
        IntervalMonthDayNanoArray::from(vec![IntervalMonthDayNanoType::make_value(
            1, -5, 2,
        )]);
    let negated = negate(&a).unwrap();
    assert_eq!(
        negated.value(0),
        IntervalMonthDayNanoType::make_value(-1, 5, -2)
    );
}

Expected behavior

Additional context

We should probably deprecate the generic kernels and implement new kernels as part of #1047

Metadata

Metadata

Assignees

Labels

arrowChanges to the arrow cratebug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions