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]
