-
Notifications
You must be signed in to change notification settings - Fork 61
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
Configure default timezone #449
Conversation
…rsing phase to evaluating phase.
Codecov Report
@@ Coverage Diff @@
## main #449 +/- ##
=========================================
Coverage 82.35% 82.36%
- Complexity 1394 1395 +1
=========================================
Files 171 171
Lines 10717 10722 +5
Branches 1766 1766
=========================================
+ Hits 8826 8831 +5
Misses 1350 1350
Partials 541 541
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.
Mostly looks good to me, just one minor change requested. Thanks.
…rValue.cast` method.
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.
Only had a few minor comments. Looks good overall!
lang/test/org/partiql/lang/eval/EvaluatingCompilerDateTimeTests.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Alan Cai <caialan@amazon.com>
…s.kt Co-authored-by: Alan Cai <caialan@amazon.com>
…`session` in `ExprValue.cast`.
…ql/partiql-lang-kotlin into configure-default-timezone
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.
EvaluationSession
class also has a now: Timestamp
member. It can have its own time zone offset defined. I was wondering if it would conflict with a separate default time zone. Should we consider using now.localOffset
which is time zone offset in minutes? (It can be null
though). Need to investigate more into this.
For the PR, just one minor suggestion. Otherwise looks great to me.
lang/test/org/partiql/lang/eval/EvaluatingCompilerDateTimeTests.kt
Outdated
Show resolved
Hide resolved
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.
Nice job
Issue #410
Solution Description:
We want to provide an option to configure default timezone offset through
EvaluationSession
class, since the default timezone offset should be considered as a kind of information provided when we evaluate the time.Changes Details:
Source code:
defaultTimezoneOffset
toEvaluationSession
class. The default value is set to be UTC time.DEFAULT_TIMEZONE_OFFSET
.EvaluationSession
.Test:
defaultTimezoneOffset
forEvaluationSession
class.defaultTimezoneOffset
to replaceDEFAULT_TIMEZONE_OFFSET
for test cases using it.