Skip to content

Conversation

@AbhishekASLK
Copy link
Contributor

This PR addresses an issue where oracle interval expressions failed to parse.

SELECT (SYSTIMESTAMP - order_date) DAY(9) TO SECOND FROM orders

Documentation

Copy link
Collaborator

@VaggelisD VaggelisD left a 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:

@AbhishekASLK AbhishekASLK requested a review from VaggelisD January 5, 2026 16:54
Comment on lines +290 to +295
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)
Copy link
Collaborator

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?

Copy link
Contributor Author

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 🙂

@VaggelisD
Copy link
Collaborator

Hey @AbhishekASLK, appreciate the PR, I'll merge this and see if there's anything to simplify.

@VaggelisD VaggelisD merged commit 7362c23 into tobymao:main Jan 12, 2026
9 checks passed
@AbhishekASLK
Copy link
Contributor Author

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.

@VaggelisD VaggelisD mentioned this pull request Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants