Skip to content

Commit

Permalink
Fix: ensure maybe parse doesn't get none
Browse files Browse the repository at this point in the history
  • Loading branch information
tobymao committed May 26, 2023
1 parent d950550 commit ec7c863
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sqlglot/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4559,6 +4559,9 @@ def maybe_parse(
return sql_or_expression.copy()
return sql_or_expression

if sql_or_expression is None:
raise ParseError(f"SQL cannot be None")

import sqlglot

sql = str(sql_or_expression)
Expand Down

0 comments on commit ec7c863

Please sign in to comment.