-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(oracle)!: interval expressions #6648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(oracle)!: interval expressions #6648
Conversation
VaggelisD
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @AbhishekASLK, thanks once again for the PR, leaving a few comments:
| if unit and self._match_text_seq("TO"): | ||
| to_unit = self._parse_function() or self._parse_var(any_token=True, upper=True) | ||
|
|
||
| if to_unit: | ||
| unit = exp.IntervalSpan(this=unit, expression=to_unit) | ||
| return self.expression(exp.Interval, this=this, unit=unit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like we're repeating existing parts of _parse_interval? Is that the case? Any chances for consolidation / clean up here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the similarity, but I'm struggling to find a clean way to merge the logic 🙂
|
Hey @AbhishekASLK, appreciate the PR, I'll merge this and see if there's anything to simplify. |
Thanks! I’ll look out for your changes, happy to learn from them. |
This PR addresses an issue where
oracleinterval expressions failed to parse.Documentation