Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2095610A4A for ; Thu, 6 Feb 2014 22:57:46 +0000 (UTC) Received: (qmail 5055 invoked by uid 500); 6 Feb 2014 22:57:39 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 4875 invoked by uid 500); 6 Feb 2014 22:57:31 -0000 Mailing-List: contact dev-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 dev@hive.apache.org Received: (qmail 4730 invoked by uid 500); 6 Feb 2014 22:57:27 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 4689 invoked by uid 99); 6 Feb 2014 22:57:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 22:57:20 +0000 Date: Thu, 6 Feb 2014 22:57:20 +0000 (UTC) From: "Venki Korukanti (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-3844) Unix timestamps don't seem to be read correctly from HDFS as Timestamp column MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-3844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13893934#comment-13893934 ] Venki Korukanti commented on HIVE-3844: --------------------------------------- Updated the patch to use Pattern/Matcher to identify the format of timestamp. I thought about not using the BigDecimal, but the output has floating point errors. Reg: Should we really be allowing numeric formats to be read as timestamp? I have seen multiple customers that have logs with different timestamp formats and they want to create one table with timestamp schema and read all sources of data. > Unix timestamps don't seem to be read correctly from HDFS as Timestamp column > ----------------------------------------------------------------------------- > > Key: HIVE-3844 > URL: https://issues.apache.org/jira/browse/HIVE-3844 > Project: Hive > Issue Type: Bug > Components: Serializers/Deserializers > Affects Versions: 0.8.0 > Reporter: Mark Grover > Assignee: Venki Korukanti > Attachments: HIVE-3844.1.patch.txt > > > Serega Shepak pointed out that something like > {code} > select cast(date_occurrence as timestamp) from xvlr_data limit 10 > {code} > where date_occurrence has BIGINT type (timestamp in milliseconds) works. But it doesn't work if the declared type is TIMESTAMP on column. The data in the date_occurence column in unix timestamp in millis. -- This message was sent by Atlassian JIRA (v6.1.5#6160)