rdblue commented on code in PR #9008:
URL: https://github.com/apache/iceberg/pull/9008#discussion_r1520417082


##########
api/src/main/java/org/apache/iceberg/util/DateTimeUtil.java:
##########
@@ -120,19 +176,32 @@ public static long isoTimeToMicros(String timeString) {
   }
 
   public static long isoTimestamptzToMicros(String timestampString) {
-    return microsFromTimestamptz(
-        OffsetDateTime.parse(timestampString, 
DateTimeFormatter.ISO_DATE_TIME));
+    return 
microsFromTimestamptz(isoTimestamptzToOffsetDateTime(timestampString));
+  }
+
+  public static OffsetDateTime isoTimestamptzToOffsetDateTime(String 
timestamp) {

Review Comment:
   I think this is adding too many conversion methods and relying on the caller 
to use its own OffsetDateTime or LocalDateTime logic (I'm looking at 
`StringLiteral.to(TimetsampType)`).
   
   I think this should use the established pattern similar to 
`isoTimestamptzToMicros` and just add `isoTimestamptzToNanos`.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to