[
https://issues.apache.org/jira/browse/DRILL-7926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17386673#comment-17386673
]
ASF GitHub Bot commented on DRILL-7926:
---------------------------------------
dzamo edited a comment on pull request #2268:
URL: https://github.com/apache/drill/pull/2268#issuecomment-886007823
Thanks @paul-rogers. I think we're actually all nearly singing from the
same hymn sheet now. Two last notes from me.
#### Milliseconds since the "local epoch" (1970-01-01 00:00 local time zone).
The following yield the same integer.
1. I tell Drill a zoneless time, Drill regards it as in UTC, Drill converts
it to UNIX time (ms since the real, UTC-based epoch).
2. I tell Drill a zoneless time, Drill regards it as in the locally
configured time zone, Drill extracts the "local UNIX time" (ms since the epoch
in local time).
I conclude that
1. The design, or spec, is (as you've explained) what is said by (2): Drill
timestamps are milliseconds since the "local epoch",
2. @oleg-zinovev has nevertheless _not_ found bugs in the examples of (1)
that he has presented here and we can keep his new code that does the same (for
the TIMESTAMPs `left.value` and `right.value`, not for query start time - see
my earlier test)
#### Bug fix vs Improvement
What do we think about me opening another ticket for us to do a second pass
on these date functions? There is usage of Joda all over the place, tests
coverage is spotty in places, there are lots of heap allocations, etc. Maybe
doing this would mean Oleg's patch for a critical bug can remain simple and
because we know we're coming back. Calendar arithmetic is so wicked that
perhaps we'll always have libs and heap allocations here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> The " age " function is not working properly.
> ---------------------------------------------
>
> Key: DRILL-7926
> URL: https://issues.apache.org/jira/browse/DRILL-7926
> Project: Apache Drill
> Issue Type: Bug
> Components: Functions - Drill
> Affects Versions: 1.17.0, 1.18.0
> Reporter: Александр Глухов
> Priority: Blocker
> Attachments: image-2021-05-13-16-17-21-154.png, screenshot-1.png,
> screenshot-2.png
>
>
> The " age " function is not working properly.
> *Playback steps*
> {code:sql}
> select extract(year from m. "years") `years` from (select age('2021-05-13',
> '2007-07-02') `years") m{code}
> *Expected result* 13.
> *Actual result* 14.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)