paul-rogers edited a comment on pull request #2149:
URL: https://github.com/apache/drill/pull/2149#issuecomment-767360757


   @luocooong, thanks for the question. There are three advantages of using the 
Java rather than Joda time.
   
   First, Joda was originally written to extend the limited Java date/time 
classes. Most of the Joda functionality, however, was added to Java 8 and so 
Joda has been obsolete since Java 8. Drill no longer builds on Java 7, so the 
need for Joda no longer exists. (Except for the Joda `Period` class, which does 
not exist in Java for some reason.)
   
   The second reason had to due with the JSON writer used for streaming. I 
can't recall the details (this code was written 6+ months ago), but I think the 
underlying JSON classes used Java time, so I would either have to convert from 
Joda to Java on each value; or convert the column accessors to use Java. I 
chose the latter for the reasons above.
   
   The third reason is that the accessor (and other EVF classes) are visible to 
plugins. By using Joda, we force plugin developers to use obsolete libraries 
and to remember the differences between Joda and Java time classes, which is a 
nuisance. By using Java time, we reduce the burden on plugin developers 
somewhat.
   
   As noted in the comment at the top, this change will affect anyone who used 
the provided schema feature and provided a custom date/time format. I'm 
guessing that no one has actually used that feature given that we never saw any 
questions about it. Moving forward, it is better, if anyone does use the custom 
date/time format, that they do so with Java's format rather than the obsolete 
Joda formats.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to