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 896D1105A7 for ; Tue, 17 Sep 2013 20:48:13 +0000 (UTC) Received: (qmail 4256 invoked by uid 500); 17 Sep 2013 20:47:52 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 4202 invoked by uid 500); 17 Sep 2013 20:47:52 -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 4185 invoked by uid 500); 17 Sep 2013 20:47:52 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 4158 invoked by uid 99); 17 Sep 2013 20:47:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Sep 2013 20:47:52 +0000 Date: Tue, 17 Sep 2013 20:47:51 +0000 (UTC) From: "Sergey Shelukhin (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-5304) JDO and SQL filters can both return different results for string compares depending on underlying datastore 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-5304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13769931#comment-13769931 ] Sergey Shelukhin commented on HIVE-5304: ---------------------------------------- Actually, all names - I see show indexes order also changes in some queries, etc. > JDO and SQL filters can both return different results for string compares depending on underlying datastore > ----------------------------------------------------------------------------------------------------------- > > Key: HIVE-5304 > URL: https://issues.apache.org/jira/browse/HIVE-5304 > Project: Hive > Issue Type: Bug > Components: Metastore > Reporter: Sergey Shelukhin > > Hive uses JDOQL filters to optimize partition retrieval; recently direct SQL was added to optimize it further. Both of these methods may end up pushing StringCol op 'SomeString' to underlying SQL datastore. Many paths also pushes order by-s, although these are not as problematic. > The problem is that different datastores handle string compares differently. > While testing on Postgres, I see that results in different things, from innocent like order changes in "show partitions", to more serious like > {code} > alter table ptestfilter drop partition (c>='US', d<='2') > {code} > in drop_partitions_filter.q - in Derby, with which the .q.out file was generated, it drops "c=Uganda/d=2"; this also passes on MySQL (I ran tests with autocreated db); on Postgres with a db from the script it doesn't. > Looks like we need to enforce collation in partition names and part_key_values-es; both in the create scripts, as well as during autocreate (via package.jdo?) -- 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