Skip to content

Commit

Permalink
add regression
Browse files Browse the repository at this point in the history
  • Loading branch information
feiniaofeiafei committed Dec 30, 2024
1 parent 1f110f8 commit e108b19
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -438,4 +438,21 @@ suite("test_add_sub_diff_ceil_floor") {
sql """select * from unix_time_t where unix_timestamp(dt) <=0"""
contains("partitions=3/4 (p1,p3,p4)")
}

explain {
sql """select * from max_t where year(weeks_add(dt, 1)) >2019"""
contains("partitions=3/6 (p4,p5,p6)")
}
explain {
sql """select * from max_t where month(weeks_add(dt, 1)) >6"""
contains("partitions=6/6 (p1,p2,p3,p4,p5,p6)")
}
explain {
sql """select * from max_t where quarter(weeks_sub(dt, 1)) >3"""
contains("partitions=6/6 (p1,p2,p3,p4,p5,p6)")
}
explain {
sql """select * from max_t where weeks_diff(dt, quarter(weeks_sub(dt, 1))) >'2020-01-01'"""
contains("partitions=6/6 (p1,p2,p3,p4,p5,p6)")
}
}

0 comments on commit e108b19

Please sign in to comment.