Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 14D741798F for ; Mon, 4 May 2015 05:14:07 +0000 (UTC) Received: (qmail 26282 invoked by uid 500); 4 May 2015 05:14:07 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 26264 invoked by uid 500); 4 May 2015 05:14:06 -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 26255 invoked by uid 99); 4 May 2015 05:14:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2015 05:14:06 +0000 Date: Mon, 4 May 2015 05:14:06 +0000 (UTC) From: "Prasanth Jayachandran (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-10591) Support integer type promotion in ORC 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-10591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14526258#comment-14526258 ] Prasanth Jayachandran commented on HIVE-10591: ---------------------------------------------- [~owen.omalley]/[~gopalv] Can you someone review the patch? > Support integer type promotion in ORC > ------------------------------------- > > Key: HIVE-10591 > URL: https://issues.apache.org/jira/browse/HIVE-10591 > Project: Hive > Issue Type: New Feature > Affects Versions: 1.3.0 > Reporter: Prasanth Jayachandran > Assignee: Prasanth Jayachandran > Attachments: HIVE-10591.1.patch > > > ORC currently does not support schema-on-read. If we alter an ORC table with 'int' type to 'bigint' and if we query the altered table ClassCastException will be thrown as the schema on read from table descriptor will expect LongWritable whereas ORC will return IntWritable based on file schema stored within ORC file. OrcSerde currently doesn't do any type conversions or type promotions for performance reasons in inner loop. Since smallints, ints and bigints are stored in the same way in ORC, it will be possible be allow such type promotions without hurting performance. Following type promotions can be supported without any casting > smallint -> int > smallint -> bigint > int -> bigint > Tinyint promotion is not possible without casting as tinyints are stored using RLE byte writer whereas smallints, ints and bigints are stored using RLE integer writer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)