Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 99120200D61 for ; Tue, 19 Dec 2017 12:30:29 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 95D20160C1B; Tue, 19 Dec 2017 11:30:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0EA1A160C18 for ; Tue, 19 Dec 2017 12:30:28 +0100 (CET) Received: (qmail 15910 invoked by uid 500); 19 Dec 2017 11:30:28 -0000 Mailing-List: contact issues-help@carbondata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@carbondata.apache.org Delivered-To: mailing list issues@carbondata.apache.org Received: (qmail 15900 invoked by uid 99); 19 Dec 2017 11:30:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Dec 2017 11:30:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AC82CDFC2F; Tue, 19 Dec 2017 11:30:25 +0000 (UTC) From: mohammadshahidkhan To: issues@carbondata.apache.org Reply-To: issues@carbondata.apache.org References: In-Reply-To: Subject: [GitHub] carbondata pull request #1126: [CARBONDATA-1258] CarbonData should not allow... Content-Type: text/plain Message-Id: <20171219113026.AC82CDFC2F@git1-us-west.apache.org> Date: Tue, 19 Dec 2017 11:30:25 +0000 (UTC) archived-at: Tue, 19 Dec 2017 11:30:29 -0000 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 ---