Skip to content
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(hive): parse <number> <date_part> as an interval instead of an alias #2151

Merged
merged 2 commits into from
Sep 4, 2023

Conversation

georgesittas
Copy link
Collaborator

Fixes #2123

Tested in https://demo.gethue.com/hue/editor/?type=hiv (enter demo for both the username and the password):

Screenshot 2023-09-04 at 7 15 59 PM

The date parts were chosen based on Hive's docs for the interval type:

image

sqlglot/dialects/hive.py Outdated Show resolved Hide resolved
@georgesittas georgesittas requested a review from tobymao September 4, 2023 16:47
@tobymao tobymao merged commit 9c4a9cd into main Sep 4, 2023
@tobymao tobymao deleted the jo/hive_interval_fix branch September 4, 2023 17:01
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.

(hive) hive parsing error, date addition and subtraction are parsed into aliases
2 participants