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 5577810B30 for ; Wed, 4 Sep 2013 02:03:52 +0000 (UTC) Received: (qmail 74618 invoked by uid 500); 4 Sep 2013 02:03:51 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 74569 invoked by uid 500); 4 Sep 2013 02:03:51 -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 74560 invoked by uid 500); 4 Sep 2013 02:03:51 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 74557 invoked by uid 99); 4 Sep 2013 02:03:51 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Sep 2013 02:03:51 +0000 Date: Wed, 4 Sep 2013 02:03:51 +0000 (UTC) From: "Phabricator (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-5204) Change type compatibility methods to use PrimitiveCategory rather than TypeInfo 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-5204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phabricator updated HIVE-5204: ------------------------------ Attachment: HIVE-5204.D12687.1.patch jdere requested code review of "HIVE-5204 [jira] Change type compatibility methods to use PrimitiveCategory rather than TypeInfo". Reviewers: JIRA HIVE-5204: Change type compatibility methods to use PrimitiveCategory rather than TypeInfo - convert getCommonClass()/etc to use PrimtiveCategory, rather than TypeInfo. This allows varchar(10) and varchar(20) to be treated the same. - type compatibility for varchar and other types. Ideally should be similar to string. - type params need to be set properly for comparison/common types. For example, commonClass(varchar(10), varchar(20)) should be varchar(20). - move special case string/date/varchar conversion code out of GenericUDFBaseCompare.initialize() The type compatibility methods in the FunctionRegistry (getCommonClass, implicitConvertable) compare TypeInfo objects directly when its doing its type compatibility logic. This won't work as well with qualified types (varchar, char, decimal), because we will need different TypeInfo objects to represent varchar(5) and varchar(10), and the equality comparisons won't work anymore. We can change this logic to look at the PrimitiveCategory for the TypeInfo instead. NO PRECOMMIT TESTS - dependent on changes in HIVE-5203 TEST PLAN EMPTY REVISION DETAIL https://reviews.facebook.net/D12687 AFFECTED FILES ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseCompare.java ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java MANAGE HERALD RULES https://reviews.facebook.net/herald/view/differential/ WHY DID I GET THIS EMAIL? https://reviews.facebook.net/herald/transcript/30453/ To: JIRA, jdere > Change type compatibility methods to use PrimitiveCategory rather than TypeInfo > ------------------------------------------------------------------------------- > > Key: HIVE-5204 > URL: https://issues.apache.org/jira/browse/HIVE-5204 > Project: Hive > Issue Type: Improvement > Reporter: Jason Dere > Assignee: Jason Dere > Attachments: HIVE-5204.1.patch, HIVE-5204.D12687.1.patch > > > The type compatibility methods in the FunctionRegistry (getCommonClass, implicitConvertable) compare TypeInfo objects directly when its doing its type compatibility logic. This won't work as well with qualified types (varchar, char, decimal), because we will need different TypeInfo objects to represent varchar(5) and varchar(10), and the equality comparisons won't work anymore. We can change this logic to look at the PrimitiveCategory for the TypeInfo instead. > NO PRECOMMIT TESTS - dependent on changes in HIVE-5203 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira