Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
chagelo committed Oct 5, 2024
1 parent dd0d158 commit 06be419
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/query/functions/tests/it/scalars/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -715,4 +715,9 @@ fn test_date_date_diff(file: &mut impl Write) {
"date_diff(second, to_timestamp('2020-02-29 23:59:59.165575'), to_timestamp('2019-02-28 23:59:59.423179'))",
&[],
);
run_ast(
file,
"date_diff(second, to_timestamp('2020-02-29 23:59:59'), to_timestamp('2019-02-28 23:59:59'))",
&[],
);
}
9 changes: 9 additions & 0 deletions src/query/functions/tests/it/scalars/testdata/datetime.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3624,3 +3624,12 @@ output domain : {-31622399..=-31622399}
output : -31622399


ast : date_diff(second, to_timestamp('2020-02-29 23:59:59'), to_timestamp('2019-02-28 23:59:59'))
raw expr : diff_seconds(to_timestamp('2019-02-28 23:59:59'), to_timestamp('2020-02-29 23:59:59'))
checked expr : diff_seconds<Timestamp, Timestamp>(to_timestamp<String>("2019-02-28 23:59:59"), to_timestamp<String>("2020-02-29 23:59:59"))
optimized expr : -31622400_i64
output type : Int64
output domain : {-31622400..=-31622400}
output : -31622400


0 comments on commit 06be419

Please sign in to comment.