Github user mohammadshahidkhan commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1126#discussion_r157729475
--- Diff: core/src/main/java/org/apache/carbondata/core/keygenerator/directdictionary/timestamp/DateDirectDictionaryGenerator.java ---
@@ -42,12 +42,37 @@
private String dateFormat;
+ /**
+ * min value supported for date type column
+ */
+ private static final long MIN_VALUE;
+ /**
+ * MAx value supported for date type column
+ */
+ private static final long MAX_VALUE;
/**
* Logger instance
*/
private static final LogService LOGGER =
LogServiceFactory.getLogService(DateDirectDictionaryGenerator.class.getName());
+ static {
+ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+ df.setTimeZone(TimeZone.getTimeZone("GMT"));
+ long minValue = 0;
+ long maxValue = 0;
+ try {
+ minValue = df.parse("0001-01-01").getTime();
+ maxValue = df.parse("9999-12-31").getTime();
+ } catch (ParseException e) {
--- End diff --
Fixed
---