zstan commented on code in PR #225:
URL: https://github.com/apache/calcite-avatica/pull/225#discussion_r1315135860


##########
core/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java:
##########
@@ -61,11 +61,11 @@ private DateTimeUtils() {}
 
   /** Regex for date, YYYY-MM-DD. */
   private static final Pattern ISO_DATE_PATTERN =
-      Pattern.compile("^(\\d{4})-([0]\\d|1[0-2])-([0-2]\\d|3[01])$");
+      Pattern.compile("^(\\d{4})-([0]?\\d|1[0-2])-([0-2]?\\d|3[01])$");
 
   /** Regex for time, HH:MM:SS. */
   private static final Pattern ISO_TIME_PATTERN =
-      Pattern.compile("^([0-2]\\d):[0-5]\\d:[0-5]\\d(\\.\\d*)*$");
+      Pattern.compile("^([0-2]\\d):[0-5]?\\d:[0-5]?\\d(\\.\\d*)*$");

Review Comment:
   @herunkang2018 ok, done.



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