Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
kgopal492 committed Aug 3, 2023
1 parent f172df6 commit 96ee3e3
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def setUp(self):
def test_union_and_count_distinct(self):
query = "SELECT \nCOUNT( DISTINCT x) from a \nUNION select \ncount(distinct y) from b"
self._verify_query_validation_results(
self._validator._get_validation_suggestions(query),
self._validator._get_sql_glot_validation_results(query),
[
self._get_union_all_validation_result(2, 0, 2, 4),
self._get_approx_distinct_validation_result(1, 0, 1, 14),
Expand All @@ -254,7 +254,7 @@ def test_union_and_count_distinct(self):
def test_union_and_regexp_like(self):
query = "SELECT * from a WHERE \nx like 'foo' or x like \n'bar' \nUNION select * from b where y like 'foo' AND x like 'bar'"
self._verify_query_validation_results(
self._validator._get_validation_suggestions(query),
self._validator._get_sql_glot_validation_results(query),
[
self._get_union_all_validation_result(3, 0, 3, 4),
self._get_regexp_like_validation_result(
Expand All @@ -266,7 +266,7 @@ def test_union_and_regexp_like(self):
def test_count_distinct_and_regexp_like(self):
query = "SELECT \nCOUNT( DISTINCT x) from a WHERE \nx LIKE 'foo' or x like \n'bar' and y like 'foo'"
self._verify_query_validation_results(
self._validator._get_validation_suggestions(query),
self._validator._get_sql_glot_validation_results(query),
[
self._get_approx_distinct_validation_result(1, 0, 1, 14),
self._get_regexp_like_validation_result(
Expand All @@ -278,7 +278,7 @@ def test_count_distinct_and_regexp_like(self):
def test_all_errors(self):
query = "SELECT \nCOUNT( DISTINCT x) from a WHERE \nx LIKE 'foo' or x like \n'bar' and y like 'foo' \nUNION select * from b"
self._verify_query_validation_results(
self._validator._get_validation_suggestions(query),
self._validator._get_sql_glot_validation_results(query),
[
self._get_union_all_validation_result(4, 0, 4, 4),
self._get_approx_distinct_validation_result(1, 0, 1, 14),
Expand All @@ -291,7 +291,7 @@ def test_all_errors(self):
def test_extra_whitespace(self):
query = "SELECT \n COUNT( DISTINCT x) from a WHERE \n\t x LIKE 'foo' or x like \n'bar' and y like 'foo' \n UNION select * from b"
self._verify_query_validation_results(
self._validator._get_validation_suggestions(query),
self._validator._get_sql_glot_validation_results(query),
[
self._get_union_all_validation_result(4, 5, 4, 9),
self._get_approx_distinct_validation_result(1, 2, 1, 16),
Expand Down

0 comments on commit 96ee3e3

Please sign in to comment.