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 310F8200B50 for ; Fri, 29 Jul 2016 23:44:42 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2FBD6160A79; Fri, 29 Jul 2016 21:44:42 +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 51F1C160A6E for ; Fri, 29 Jul 2016 23:44:41 +0200 (CEST) Received: (qmail 96964 invoked by uid 500); 29 Jul 2016 21:44:35 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 96954 invoked by uid 99); 29 Jul 2016 21:44:35 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jul 2016 21:44:35 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B6DD3C8D0E for ; Fri, 29 Jul 2016 21:44:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.979 X-Spam-Level: ** X-Spam-Status: No, score=2.979 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id iPCoZqdBdXsO for ; Fri, 29 Jul 2016 21:44:32 +0000 (UTC) Received: from mout.perfora.net (mout.perfora.net [74.208.4.197]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D462F5F24E for ; Fri, 29 Jul 2016 21:44:31 +0000 (UTC) Received: from [52.70.63.185] ([52.70.63.185]) by mrelay.perfora.net (mreueus001) with ESMTPSA (Nemesis) id 0MeRoX-1beSXB3QKt-00QLCo for ; Fri, 29 Jul 2016 23:44:23 +0200 Content-Type: multipart/alternative; boundary="----sinikael-?=_1-14698286608450.33429141715168953" From: Andrew Sears To: user@hive.apache.org In-Reply-To: References: Subject: Re: Some dates add/less a day... Message-Id: Date: Fri, 29 Jul 2016 17:44:20 -0400 X-Cm-Message-Id: 1469828660717968d64dc0159af45a0d56c89b8ebb3e51ac579bce34af53f1171321553 X-Cm-Draft-Id: WyJhIiwzLCJkcmFmdF9pZCIsMTQ2OTgyODY2MDQyNSwidiIsMV0= X-Mailer: CloudMagic MIME-Version: 1.0 X-Provags-ID: V03:K0:WP2CkVCz7JQQRQ8ew5ZO/0xr2P/6m/anUagdXqkAnoyyPTLG4l7 qspkIp7MX0pPPVPef4xBLbs6rVhN/1K1TuOK9nfJcj/z1NieMKDqIoUtQg76tHTGeYVYnfi RG6PsNKcduqR2gObkVgKWRwfl95OgpW0Jtl5EvbdDdYS1ZQDpAOEV4S/widtnN2qAuM2JAU 8gbwJdHgFgWXZXDwnkzYg== X-UI-Out-Filterresults: notjunk:1;V01:K0:HKvPrvVwfks=:AJ9YFy3ce1NhGqbcVA0EGR v4U1OcVSZlEtJpVn4vGiJ5uvUGPpZQpbCHvn7JKNgBmLpqpJP8FtULSX0VrauziK6CpkLM342 L6w34UYTEMCxh2lFFF+wOFVk8YaeBb89MXmm42wvBLSYnTyDzPdbJo49CJKQswv4p34/Nsu/x S1SsMANyCP2/eSJ/mo+8LgEBEmzSOSWLfBHK+lSo0zX1Eq+qEOLHR5PmLNtQlL4uf3X5z1qhw nXsw98yWoEKgWUHkxZrvAF+Csv2dyoBRo2Fs9rjNqAuNm4Avwln/J5cchFKnDnk57GQwSaf6y S5Hbl+XIkW+IYmtF6cUtfyOrGkpvDEWSjj7kd+ksYfqP3J5SIkJmmaBLPIYxF4h/4vErdWtHV +gz2NzjxQNO8T65ceigZMD8U+z3IGj1xwBvPKKcRoDzaBE9hyABcTmTdg1APvgrrVt7vuDE97 797zfoc3jii27xrtI4hpfJAWx9BWQb3hRe6LHcgFG8huSKR7nzxxPtVEbBaBuJLrucWj6JpH0 DfjwGKTtyEC+dv3FGqBNJobhB5sBwncENu5OmNZYTkI0csswkwqW9/FvXQnsrlTUkeQ73cBgQ p5Wdpkasur7M46Qy1U5n/6D0/AjqupcoxJjd2wk3++giJCPomRt4Mt+XrzhfX/5ZwbW0F/aoO 5XoVx2bXL0s8RVp5gLv/sYvWDG/qunclyQUa+4hqpvJ7l1bt5rAo5SunXjFD/RvUcGWyPjji4 IEKuVDPMw/6fPIsZ archived-at: Fri, 29 Jul 2016 21:44:42 -0000 ------sinikael-?=_1-14698286608450.33429141715168953 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi there, This is a critical bug fixed by a JIRA, will see if I can get = the number for you. It involves patching lib/hive-* files. Cheers, Andrew On Fri, Jul 29, 2016 at 4:37 PM, Juli=C3=A1n Arocena < jarocena@temperies.= com [jarocena@temperies.com] > wrote: Hi, I=C2=B4m having a problem with = some dates using external tables to a text file. Let me give you an = example: file content: 1946-10-01 1946-10-02 table: create external table = date_issue_test ( date_test Date ) ROW FORMAT DELIMITED FIELDS TERMINATED = BY '\001' LINES TERMINATED BY '\n' STORED AS TEXTFILE LOCATION = '/user/hive/test'; Select * from date_issue_test; OK 1946-10-02 1946-10-02 As you can see in this case it adds a day, there are a few cases like this. Also I tried with a CAST and a fixed date as bellow : hive> select CAST('1946-10-01' as date) from date_issue_test limit 1; OK = 1946-10-02 Any idea to help me? Thank you so much! Julian ------sinikael-?=_1-14698286608450.33429141715168953 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Hi there,

This is a critical bug fixed by= a JIRA, will see if I can get the number for you. It involves patching = lib/hive-* files.

Cheers,
Andrew

On Fri, Jul 29, 2016 at 4:37 PM, Juli=C3=A1n Arocena <jarocena@temperies.com> = wrote:

Hi,

I= =C2=B4m having a problem with some dates using external tables to a text = file. Let me give you an example:

file = content:
1946-10-01
1946-10= -02

table:
create = external table date_issue_test
(
=
date_test Date

)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\001'
LINES TERMINATED BY= '\n'
STORED AS TEXTFILE
LOCATION= '/user/hive/test';

Select * = from date_issue_test;

OK
1946-10= -02
1946-10-02

As you can see in this case it adds a day, there are a few cases = like this.

Also I tried with a CAST and a fixed = date as bellow :

hive> select CAST('1946-10-01' = as date) from date_issue_test limit 1;
OK
<= div>
1946-10-02

Any idea to= help me?

Thank you so much!=

Julian


------sinikael-?=_1-14698286608450.33429141715168953--