[
https://issues.apache.org/jira/browse/DRILL-7989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17404689#comment-17404689
]
ASF GitHub Bot commented on DRILL-7989:
---------------------------------------
paul-rogers commented on pull request #2299:
URL: https://github.com/apache/drill/pull/2299#issuecomment-905830673
@luocooong, thanks for the explanation. The "new" JSON reader supports both
date formats. Our question is about the "old" one.
As noted in a previous comment: the code change looks fine except that it
seems that we are storing a UTC time value in a Drill TIMESTAMP vector. The
tests seem to verify this. (But, I could be wrong.)
Using UTC in Drill will seem to work if we only consider Mongo, and only
consider a scan query. Things won't work if we use those UTC dates with parts
of Drill that expect local times. Here is a quick check: get the current time
in UTC. Pass that to the old JSON reader in Mongo's relaxed format. Then, use
Drill's newly revised `AGE()` function to compute the difference between the
column value and the current time. The output should be just a few seconds or
less. Of course, this will always work if your machine's time zone is UTC. But,
if it is anything else, and we don't do the conversion correctly, then the
`AGE()` function will return the difference between UTC and local time, which
is wrong in this test case.
Time conversions are confusing. I hope the above makes sense.
If you can fix that issue (or explain why the code does, in fact, work
correctly), we'll be good to go.
--
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]
> Use the UTC formatter in the JSON reader
> ----------------------------------------
>
> Key: DRILL-7989
> URL: https://issues.apache.org/jira/browse/DRILL-7989
> Project: Apache Drill
> Issue Type: Improvement
> Reporter: Cong Luo
> Assignee: Cong Luo
> Priority: Major
> Fix For: 1.20.0
>
>
> MongoDB use the UTC format to specify the date value by default. But the JSON
> reader (old version) use the fixed date formatter :
> "yyyy-MM-dd'T'HH:mm:ss.SSSXX". Need to change to the
> "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" format.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)