Skip to content

Commit ebab03e

Browse files
start_date and end_date casting fix (#22)
1 parent 861b095 commit ebab03e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

macros/get_metric_sql.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ joined as (
143143
bounded as (
144144
select
145145
*,
146-
{% if start_date %} '{{ start_date }}' {% else %} min(case when has_data then period end) over () {% endif %} as lower_bound,
147-
{% if end_date %} '{{ end_date }}' {% else %} max(case when has_data then period end) over () {% endif %} as upper_bound
146+
{% if start_date %}cast('{{ start_date }}' as date){% else %} min(case when has_data then period end) over () {% endif %} as lower_bound,
147+
{% if end_date %}cast('{{ end_date }}' as date){% else %} max(case when has_data then period end) over () {% endif %} as upper_bound
148148
from joined
149149
),
150150

0 commit comments

Comments
 (0)