You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the lead(created_time,1,0)
created_time is datetime(6)
and 0 is bigint, so the planner cast created_time as bigint,
could use lead(created_time,1,NULL) or
lead(created_time,1, "2025-04-23 10:10:10") sometime value
Search before asking
Version
2.1.8
What's Wrong?
The data type of created_time is datetime(6)
What You Expected?
Return the same data type and format as the original field.
How to Reproduce?
create table test(
created_time datetime(6)
);
insert into test
VALUES ('2025-04-21 17:57:32.064000'),
('2025-04-21 17:57:33.804000'),
('2025-04-21 17:57:34.156000');
select
created_time,
lag(created_time,1,0) over(order by created_time) as lg_created_time
from test
;
select
created_time,
lead(created_time,1,0) over(order by created_time) as lg_created_time
from test
;
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: