Skip to content

date_bin scalar & array paths have different error behaviours #22528

@Jefffrey

Description

@Jefffrey

Describe the bug

Given this error test case, we return null:

# Negative timestamp with month interval - should return NULL instead of panicking
query P
select date_bin(interval '1 month', to_timestamp_millis(-1040292460), timestamp '1984-01-07 00:00:00');
----
NULL

However if we modify it to use the array path instead, it errors:

DataFusion CLI v53.1.0
> select date_bin(interval '1 month', c, timestamp '1984-01-07 00:00:00')
from values (to_timestamp_millis(-1040292460)) t(c);

Arrow error: Compute error: Execution error: Invalid timestamp value

To Reproduce

No response

Expected behavior

We should fix these paths so the behaviour is consistent across paths. May need to investigate what other behaviours deviate.

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions