zstan commented on code in PR #4363:
URL: https://github.com/apache/calcite/pull/4363#discussion_r2084420748


##########
core/src/main/java/org/apache/calcite/util/TimestampWithTimeZoneString.java:
##########
@@ -41,21 +46,39 @@ public class TimestampWithTimeZoneString
   final TimestampString localDateTime;
   final TimeZone timeZone;
   final String v;
+  private final DateTimeUtils.PrecisionTime pt;
+
+  private static final ThreadLocal<@Nullable SimpleDateFormat> 
TIMESTAMP_FORMAT =

Review Comment:
   It not easy, also if it thread safety right now we have no guarantee that it 
remain same in future.
   DateFormat is not thread safe (check java doc) and checker framework reports 
about erroneous usage without thread local mechanics. Thus i forced to use such 
a code, if you have different approach here - plz let me know. Thanks !



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

Reply via email to