Skip to content

Commit

Permalink
Update druid_tests.py
Browse files Browse the repository at this point in the history
  • Loading branch information
john-bodley authored Oct 9, 2021
1 parent 9f8b1b5 commit 4e8cb2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration_tests/db_engine_specs/druid_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def test_timegrain_expressions(self):
test_cases = {
"PT1S": f"TIME_FLOOR({col}, 'PT1S')",
"PT5M": f"TIME_FLOOR({col}, 'PT5M')",
f"P1W/1970-01-03T00:00:00Z": "TIME_SHIFT(TIME_FLOOR(TIME_SHIFT({col}, 'P1D', 1), 'P1W'), 'P1D', 5)",
f"1969-12-28T00:00:00Z/P1W": "TIME_SHIFT(TIME_FLOOR(TIME_SHIFT({col}, 'P1D', 1), 'P1W'), 'P1D', -1)",
"P1W/1970-01-03T00:00:00Z": f"TIME_SHIFT(TIME_FLOOR(TIME_SHIFT({col}, 'P1D', 1), 'P1W'), 'P1D', 5)",
"1969-12-28T00:00:00Z/P1W": f"TIME_SHIFT(TIME_FLOOR(TIME_SHIFT({col}, 'P1D', 1), 'P1W'), 'P1D', -1)",
}
for grain, expected in test_cases.items():
actual = DruidEngineSpec.get_timestamp_expr(
Expand Down

0 comments on commit 4e8cb2a

Please sign in to comment.