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 A524F200C29 for ; Tue, 28 Feb 2017 14:50:50 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A3D52160B7C; Tue, 28 Feb 2017 13:50:50 +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 C582C160B6A for ; Tue, 28 Feb 2017 14:50:49 +0100 (CET) Received: (qmail 29958 invoked by uid 500); 28 Feb 2017 13:50:49 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 29949 invoked by uid 99); 28 Feb 2017 13:50:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2017 13:50:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 7E8F21A7A07 for ; Tue, 28 Feb 2017 13:50:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.546 X-Spam-Level: X-Spam-Status: No, score=-1.546 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-2.999, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id dHH92YhSbS8G for ; Tue, 28 Feb 2017 13:50:47 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 61FC35FCB9 for ; Tue, 28 Feb 2017 13:50:46 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 84C57E00D3 for ; Tue, 28 Feb 2017 13:50:45 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 365D821D62 for ; Tue, 28 Feb 2017 13:50:45 +0000 (UTC) Date: Tue, 28 Feb 2017 13:50:45 +0000 (UTC) From: "Sunil Kumar (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-16056) Hive Changing Future Timestamp Values column values when any clause or filter applied MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 28 Feb 2017 13:50:50 -0000 [ https://issues.apache.org/jira/browse/HIVE-16056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sunil Kumar updated HIVE-16056: ------------------------------- Summary: Hive Changing Future Timestamp Values column values when any clause or filter applied (was: Hive Changing Future Times tamp Values column values when any clause or filter applied) > Hive Changing Future Timestamp Values column values when any clause or filter applied > ------------------------------------------------------------------------------------- > > Key: HIVE-16056 > URL: https://issues.apache.org/jira/browse/HIVE-16056 > Project: Hive > Issue Type: Bug > Components: Beeline, Database/Schema > Affects Versions: 1.2.1 > Reporter: Sunil Kumar > > Hi, > We are observing different behavior of Hive for the timestamp column values. When we apply clause like order by, distinct on same or other other column in the hive query it print different result for the timestamp value for year which start after 2300.. > Steps: > 1. Create a hive table > create table cutomer_sample(id int, arrival_time timestamp, dob date) stored as ORC; > 2. Populate some data with future timestamp values > insert into table cutomer_sample values (1,'2015-01-01 00:00:00.0','2015-01-01'), (2,'2018-01-01 00:00:00.0','2018-01-01') , (3,'2099-01-01 00:00:00.0','2099-01-01'), (4,'2100-01-01 00:00:00.0','2100-01-01'),(5,'2500-01-01 00:00:00.0','2500-01-01'),(6,'2200-01-01 00:00:00.0','2200-01-01'),(7,'2300-01-01 00:00:00.0','2300-01-01'),(8,'2400-01-01 00:00:00.0','2400-01-01'); > 3. Select all data with any clause > select * from cutomer_sample; > Output: > select * from cutomer_sample; > +--------------------+------------------------------+---------------------+--+ > | cutomer_sample.id | cutomer_sample.arrival_time | cutomer_sample.dob | > +--------------------+------------------------------+---------------------+--+ > | 1 | 2015-01-01 00:00:00.0 | 2015-01-01 | > | 2 | 2018-01-01 00:00:00.0 | 2018-01-01 | > | 3 | 2099-01-01 00:00:00.0 | 2099-01-01 | > | 4 | 2100-01-01 00:00:00.0 | 2100-01-01 | > | 5 | 2500-01-01 00:00:00.0 | 2500-01-01 | > | 6 | 2200-01-01 00:00:00.0 | 2200-01-01 | > | 7 | 2300-01-01 00:00:00.0 | 2300-01-01 | > | 8 | 2400-01-01 00:00:00.0 | 2400-01-01 | > +--------------------+------------------------------+---------------------+--+ > 4. Apply order by on timestamp column > select * from cutomer_sample order by arrival_time ; > +--------------------+--------------------------------+---------------------+--+ > | cutomer_sample.id | cutomer_sample.arrival_time | cutomer_sample.dob | > +--------------------+--------------------------------+---------------------+--+ > | 7 | 1715-06-13 00:25:26.290448384 | 2300-01-01 | > | 8 | 1815-06-13 00:25:26.290448384 | 2400-01-01 | > | 5 | 1915-06-14 00:48:46.290448384 | 2500-01-01 | > | 1 | 2015-01-01 00:00:00.0 | 2015-01-01 | > | 2 | 2018-01-01 00:00:00.0 | 2018-01-01 | > | 3 | 2099-01-01 00:00:00.0 | 2099-01-01 | > | 4 | 2100-01-01 00:00:00.0 | 2100-01-01 | > | 6 | 2200-01-01 00:00:00.0 | 2200-01-01 | > +--------------------+--------------------------------+---------------------+--+ > you can see value of timestamp got changed after 2300 year.. > > 5. Apply order by on some other column still same behavior > +--------------------+--------------------------------+---------------------+--+ > | cutomer_sample.id | cutomer_sample.arrival_time | cutomer_sample.dob | > +--------------------+--------------------------------+---------------------+--+ > | 1 | 2015-01-01 00:00:00.0 | 2015-01-01 | > | 2 | 2018-01-01 00:00:00.0 | 2018-01-01 | > | 3 | 2099-01-01 00:00:00.0 | 2099-01-01 | > | 4 | 2100-01-01 00:00:00.0 | 2100-01-01 | > | 6 | 2200-01-01 00:00:00.0 | 2200-01-01 | > | 7 | 1715-06-13 00:25:26.290448384 | 2300-01-01 | > | 8 | 1815-06-13 00:25:26.290448384 | 2400-01-01 | > | 5 | 1915-06-14 00:48:46.290448384 | 2500-01-01 | > +--------------------+--------------------------------+---------------------+--+ -- This message was sent by Atlassian JIRA (v6.3.15#6346)