-
Notifications
You must be signed in to change notification settings - Fork 62
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
Move Usage of Default Timezone From Parser to Evaluator #448
Conversation
…rsing phase to evaluating phase.
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.
Overall looks good. Some minor changes required. Great job.
Co-authored-by: Abhilash Kuhikar <kuhikar@amazon.com>
Co-authored-by: Abhilash Kuhikar <kuhikar@amazon.com>
Co-authored-by: Abhilash Kuhikar <kuhikar@amazon.com>
Co-authored-by: Abhilash Kuhikar <kuhikar@amazon.com>
Co-authored-by: Abhilash Kuhikar <kuhikar@amazon.com>
Codecov Report
@@ Coverage Diff @@
## main #448 +/- ##
============================================
+ Coverage 82.31% 82.35% +0.03%
Complexity 1394 1394
============================================
Files 171 171
Lines 10723 10717 -6
Branches 1769 1766 -3
============================================
- Hits 8827 8826 -1
+ Misses 1353 1350 -3
+ Partials 543 541 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Ship it.
Can you change the commit message/description to something like "Removes usage of |
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.
Looks good! Thanks for including a thorough summary of changes and linking the issue. Only have one very minor nit.
Other general comments:
- +1 to what @abhikuhikar said about changing changing the commit message to something more descriptive. It would also be good to update this PR's title, so it's clear what the PR fixes without needing to click the issue.
- Try not to include special characters in the branch name (like '#'). Checking out the branch locally can cause problems (depending on the shell version):
❯ git checkout fix-issue#447
zsh: no matches found: fix-issue#447
❯ git checkout 'fix-issue#447' # notice I had to add single quotes
Switched to branch 'fix-issue#447'
Your branch is up to date with 'origin/fix-issue#447'.
Removed qualifier `DateTimeFormatter` for `DateTimeFormatter.ISO_TIME` in line 2420 and 2423.
Issue #447
Solution Description:
Originally, the
Time
in AST usestz_minutes
to decide whether the time has a timezone offset. Null value representsTIME WITHOUT TIME ZONE
, while integer value means the timezone offset in minutes forTIME WITH TIME ZONE
.However, this is not enough to distinguish the case of
TIME WITH TIME ZONE
without explicitly specifying the timezone offset. Thus, we decided to add a new attributewith_time_zone
to differentiate 3 cases:with_time_zone
is false, it meansTIME WITHOUT TIME ZONE
. In this case,tz_minutes
should also be null.with_time_zone
is true andtz_minutes
is null, it meansTIME WITH TIME ZONE
without explicitly specifying the timezone offset.with_time_zone
is true andtz_minutes
is integer, it meansTIME WITH TIME ZONE
with a explicitly specified timezone offset.Changes Details:
with_time_zone
toTime
in domain-types, serialization and deserializationof AST, and AST.sqlParser
, and afterwards refactored the block of code.EvaluatingCompilor
.