-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Describe the bug
originally opened in GlareDB/glaredb#2597
It seems that arrow_cast's special handling makes it so that it errors out when using it in an ORDER BY expr
To Reproduce
statement ok
create table ts (a int);
statement ok
insert into ts values (915148800);
# this errors
statement ok
SELECT
DATE_TRUNC('minute', arrow_cast(a, 'Timestamp(Second, None)')) AS minute
FROM
ts
ORDER BY
DATE_TRUNC('minute', arrow_cast(a, 'Timestamp(Second, None)'));Expected behavior
It should be functionally equivalent in this example to using to_timestamp_seconds
SELECT
DATE_TRUNC('minute', to_timestamp_seconds(a)) AS minute
FROM
ts
ORDER BY
DATE_TRUNC('minute', to_timestamp_seconds(a));Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed