rdsr commented on a change in pull request #198: [Baseline] Apply Baseline to iceberg-data #156 URL: https://github.com/apache/incubator-iceberg/pull/198#discussion_r288145073
########## File path: data/src/test/java/org/apache/iceberg/data/RandomGenericData.java ########## @@ -229,7 +231,8 @@ private static Object generatePrimitive(Type.PrimitiveType primitive, Random ran case DATE: // this will include negative values (dates before 1970-01-01) - return EPOCH_DAY.plusDays(random.nextInt() % ABOUT_380_YEARS_IN_DAYS); Review comment: If we do not need the negative days here, we can slightly simplify the exp from `(random.nextBoolean() ? 1 : -1) * random.nextInt(ABOUT_380_YEARS_IN_DAYS)` to `random.nextInt(ABOUT_380_YEARS_IN_DAYS)` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org