MaxGekk commented on issue #26507: [WIP][SQL][2.4] Parse timestamps in microsecond precision in JSON datasource URL: https://github.com/apache/spark/pull/26507#issuecomment-553773799 > is there some standard to define the behavior? I think regular mathematical definition is applicable here: https://en.wikipedia.org/wiki/Fraction_(mathematics)#Decimal_fractions_and_percentages > For example, 11:11:11.123, how shall we interpret the .123 here? or it's related to the timestamp format? Java 8 DateTimeFormatter says that `S is fraction-of-second`: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html . So, it mean `11.123 = 11123/1000` seconds and `11.123456 = 11123456/1000000 = 11 seconds 123 milliseconds 456 microseconds` for the pattern `ss.SSSSSS` The doc of SimpleDateFormat says `S is Millisecond`: https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html. It means `11.123456 = 11 seconds 123456 milliseconds = 134 seconds 456 milliseconds` for the pattern `ss.SSSSSS`
---------------------------------------------------------------- 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
