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 716029623 for ; Tue, 21 Feb 2012 18:34:29 +0000 (UTC) Received: (qmail 91644 invoked by uid 500); 21 Feb 2012 18:34:29 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 91610 invoked by uid 500); 21 Feb 2012 18:34:29 -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 91602 invoked by uid 500); 21 Feb 2012 18:34:29 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 91599 invoked by uid 99); 21 Feb 2012 18:34:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 18:34:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 18:34:24 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 262C2332A0B for ; Tue, 21 Feb 2012 18:34:04 +0000 (UTC) Date: Tue, 21 Feb 2012 18:34:03 +0000 (UTC) From: "Phabricator (Commented) (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: <522332000.3.1329849244158.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1023717037.53202.1329530880666.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HIVE-2813) Throw a Hive error if we're in strict mode and a the types of a partition comparison do not match. 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-2813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212780#comment-13212780 ] Phabricator commented on HIVE-2813: ----------------------------------- kevinwilfong has commented on the revision "HIVE-2813 [jira] Throw a Hive error if we're in strict mode and a the types of a partition comparison do not match.". INLINE COMMENTS ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java:58 This should mention the variable that needs to be set to strict/nonstrict to turn this error on/off, and should mention it only applies to comparisons where one side is a partition column. ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeGenericFuncDesc.java:223-230 If the child is a column you should make sure that child is a partition column. ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeGenericFuncDesc.java:234 It might be better to add a new variable to the HiveConf.ConfVars, something like PARTITION_COMPARISON_MODE, which only controls whether or not an error is thrown here or not. We have too many things which are controlled by HIVEMAPREDMODE, setting it to nonstrict for this could turn on other things the user doesn't want. REVISION DETAIL https://reviews.facebook.net/D1803 > Throw a Hive error if we're in strict mode and a the types of a partition comparison do not match. > -------------------------------------------------------------------------------------------------- > > Key: HIVE-2813 > URL: https://issues.apache.org/jira/browse/HIVE-2813 > Project: Hive > Issue Type: Improvement > Components: Query Processor > Affects Versions: 0.8.1, 0.9.0 > Reporter: Dmitry Soshnikov > Priority: Minor > Labels: newbie, patch > Fix For: 0.9.0 > > Attachments: HIVE-2813.D1803.2.patch > > Original Estimate: 24h > Remaining Estimate: 24h > > Oftentimes people try to write queries like > SELECT * > FROM table > WHERE ds = 2011-08-03 > This won't work because quotes are missing, and it'll actually try to filter on ds = "2000". > People run into this pretty regularly; a simple check on whether the types match exactly in partition predicates would make this a lot less likely to happen. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira