Skip to content

Commit 461591e

Browse files
refactor
Co-authored-by: Giorgos Michas <geomichas96@gmail.com>
1 parent a5973d9 commit 461591e

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

sqlglot/parser.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2901,12 +2901,11 @@ def _parse_settings_property(self) -> exp.SettingsProperty:
29012901
)
29022902

29032903
def _parse_called_on_null_input_property(self) -> exp.CalledOnNullInputProperty | None:
2904-
index = self._index
2905-
if self._match_text_seq("ON", "NULL", "INPUT"):
2906-
return self.expression(exp.CalledOnNullInputProperty())
2904+
if not self._match_text_seq("ON", "NULL", "INPUT"):
2905+
self._retreat(self._index - 1)
2906+
return None
29072907

2908-
self._retreat(index - 1)
2909-
return None
2908+
return self.expression(exp.CalledOnNullInputProperty())
29102909

29112910
def _parse_volatile_property(self) -> exp.VolatileProperty | exp.StabilityProperty:
29122911
if self._index >= 2:

0 commit comments

Comments
 (0)