Skip to content

Commit

Permalink
Fix expected filters.
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanK-db committed Sep 20, 2024
1 parent b2bad6d commit cd58b51
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1656,23 +1656,23 @@ class JDBCV2Suite extends QueryTest with SharedSparkSession with ExplainSuiteHel
"DATE_TRUNC('quarter', time1) = timestamp'2024-07-01 00:00:00'")
checkFiltersRemoved(df7)
val expectedPlanFragment7 =
"PushedFilters: [(DATE_TRUNC('QUARTER', TIME1)) = 1719792000000000]"
"PushedFilters: [(DATE_TRUNC('quarter', TIME1)) = 1719817200000000]"
checkPushedInfo(df7, expectedPlanFragment7)
checkAnswer(df7, Seq(Row("adam")))

val df8 = sql("SELECT name FROM h2.test.datetime WHERE " +
"DATE_TRUNC('Millisecond', time1) = timestamp'2024-09-05 11:23:45.123'")
checkFiltersRemoved(df8)
val expectedPlanFragment8 =
"PushedFilters: [(DATE_TRUNC('MILLISECOND', TIME1)) = 1725560625123000]"
"PushedFilters: [(DATE_TRUNC('Millisecond', TIME1)) = 1725560625123000]"
checkPushedInfo(df8, expectedPlanFragment8)
checkAnswer(df8, Seq(Row("adam")))

val df9 = sql("SELECT name FROM h2.test.datetime WHERE " +
"DATE_TRUNC('MicroseconD', time1) = timestamp'2024-09-05 11:23:45.123456'")
checkFiltersRemoved(df9)
val expectedPlanFragment9 =
"PushedFilters: [(DATE_TRUNC('MICROSECOND', TIME1)) = 1725560625123456]"
"PushedFilters: [(DATE_TRUNC('MicroseconD', TIME1)) = 1725560625123456]"
checkPushedInfo(df9, expectedPlanFragment9)
checkAnswer(df9, Seq(Row("adam")))
}
Expand Down

0 comments on commit cd58b51

Please sign in to comment.