Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Nov 28, 2024
1 parent 57c1039 commit 5068760
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -818,4 +818,17 @@ suite("test_date_function") {
qt_sql_varchar1 """ select dt, fmt, unix_timestamp(dt, fmt) as k1 from date_varchar order by k1,dt,fmt; """
qt_sql_varchar1 """ select dt, unix_timestamp(dt, "%Y-%m-%d") as k1 from date_varchar order by k1,dt,fmt; """
qt_sql_varchar1 """ select fmt, unix_timestamp("1990-12-12", fmt) as k1 from date_varchar order by k1,dt,fmt; """

def test_simplify = {
sql "drop table if exists test_int_date"
sql "create table test_int_date(dt int) distributed by hash(dt) properties('replication_num'='1');"
test {
sql "select months_add(dt, 1) = date '2024-02-29' from (select date '2024-01-31' as dt)a"
result([[true]])
}
test {
sql "select years_add(dt, 1) = date '2025-02-28' from (select date '2024-02-29' as dt)a"
result([[true]])
}
}()
}

0 comments on commit 5068760

Please sign in to comment.