Skip to content

Commit ffe57ea

Browse files
fixup! fixup! fixup! fixup! fixup! fixup! implement review feedback
1 parent 9d48ef2 commit ffe57ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

macros/geo/haversine_distance.sql

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ The arguments should be float type.
2323
-- {% endif %}
2424
{%- if unit == 'mi' %}
2525
{% set conversion_rate = 1 %}
26-
{% elif unit == 'km' %}
26+
{% elif unit == 'km ' %}
2727
{% set conversion_rate = 1.60934 %}
2828
{% else %}
29-
{{ exceptions.raise_compiler_error("unit input must be one of 'mi' or 'km'. Got ' ~ unit'") }}
29+
{{ exceptions.raise_compiler_error("unit input must be one of 'mi' or 'km'. Got " ~ unit) }}
3030
{% endif %}
3131

3232
2 * 3961 * asin(sqrt(pow((sin(radians(({{ lat2 }} - {{ lat1 }}) / 2))), 2) +
@@ -54,7 +54,7 @@ The arguments should be float type.
5454
{% elif unit == 'km' %}
5555
{% set conversion_rate = 1.60934 %}
5656
{% else %}
57-
{{ exceptions.raise_compiler_error("unit input must be one of 'mi' or 'km'. Got ' ~ unit'") }}
57+
{{ exceptions.raise_compiler_error("unit input must be one of 'mi' or 'km'. Got " ~ unit) }}
5858
{% endif %}
5959
2 * 3961 * asin(sqrt(pow(sin(({{ radians_lat2 }} - {{ radians_lat1 }}) / 2), 2) +
6060
cos({{ radians_lat1 }}) * cos({{ radians_lat2 }}) *

0 commit comments

Comments
 (0)