pjfanning commented on code in PR #2959:
URL: https://github.com/apache/drill/pull/2959#discussion_r1817947436


##########
exec/java-exec/src/main/java/org/apache/drill/exec/store/mock/DateGen.java:
##########
@@ -44,13 +44,16 @@ public class DateGen extends AbstractFieldGen {
   public DateGen() {
     // Start a year ago.
     baseTime = System.currentTimeMillis() - ONE_YEAR;
-    fmt = new SimpleDateFormat("yyyy-mm-DD");
+    fmt = new SimpleDateFormat("yyyy-MM-dd");
   }
 
   @Override
   public void setValue() {
-    long randTime = baseTime + baseTime + rand.nextInt(365) * ONE_DAY;
-    String str = fmt.format(new Date(randTime));
-    colWriter.setString(str);
+    final long randTime = baseTime + baseTime + rand.nextInt(365) * ONE_DAY;

Review Comment:
   @jnturton @cgivre this doesn't look right - baseTime is a big number but we 
add it twice so the result will be a very big number, a long way in the future.



-- 
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: dev-unsubscr...@drill.apache.org

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

Reply via email to