Skip to content

Commit

Permalink
FEATURE/#386
Browse files Browse the repository at this point in the history
  • Loading branch information
joocer committed Sep 15, 2022
1 parent 0d83fdf commit 7a42b97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opteryx/managers/query/planner/planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def _filter_extract(self, function):
if "Identifier" in function:
token_name = function["Identifier"]["value"]
if token_name[0] == "@":
if token_name not in self._properties.variables:
if token_name not in self._properties.variables: # pragma: no cover
raise SqlError(f"Undefined variable found in query `{token_name}`.")
return self._properties.variables.get(token_name)
else:
Expand Down Expand Up @@ -726,7 +726,7 @@ def _show_columns_planner(self, ast, statistics):
def _set_variable_planner(self, ast, statistics):
"""put variables defined in SET statements into context"""
key = ast["SetVariable"]["variable"][0]["value"]
if key[0] != "@":
if key[0] != "@": # pragma: no cover
raise SqlError("Variable definitions must start with '@'.")
value = self._build_literal_node(ast["SetVariable"]["value"][0]["Value"])

Expand Down

0 comments on commit 7a42b97

Please sign in to comment.