Skip to content

Commit

Permalink
Fix CalciteQueryTest#testCountStarWithTimeFilterUsingStringLiterals (a…
Browse files Browse the repository at this point in the history
…pache#16221)

* Add cases to check handling equals between timestamp and string literal
  • Loading branch information
alex-plekhanov authored Apr 1, 2024
1 parent 0de44d9 commit a818b8a
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6265,15 +6265,21 @@ public void testCountStarWithTimeFilterUsingStringLiterals()
"SELECT COUNT(*) FROM druid.foo\n"
+ "WHERE __time >= '2000-01-01 00:00:00' AND __time < '2001-01-01T00:00:00'\n"
+ "OR __time >= '2001-02-01' AND __time < '2001-02-02'\n"
+ "OR __time BETWEEN '2001-03-01' AND '2001-03-02'",
+ "OR __time BETWEEN '2001-03-01' AND '2001-03-02'\n"
+ "OR __time = '2001-04-01'\n"
+ "OR __time = '2001-05-01 00:00:00'\n"
+ "OR __time = '2001-06-01T00:00:00'",
ImmutableList.of(
Druids.newTimeseriesQueryBuilder()
.dataSource(CalciteTests.DATASOURCE1)
.intervals(
querySegmentSpec(
Intervals.of("2000-01-01/2001-01-01"),
Intervals.of("2001-02-01/2001-02-02"),
Intervals.of("2001-03-01/2001-03-02T00:00:00.001")
Intervals.of("2001-03-01/2001-03-02T00:00:00.001"),
Intervals.of("2001-04-01/2001-04-01T00:00:00.001"),
Intervals.of("2001-05-01/2001-05-01T00:00:00.001"),
Intervals.of("2001-06-01/2001-06-01T00:00:00.001")
)
)
.granularity(Granularities.ALL)
Expand Down

0 comments on commit a818b8a

Please sign in to comment.