Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0922C184DF for ; Thu, 16 Jul 2015 15:43:08 +0000 (UTC) Received: (qmail 92506 invoked by uid 500); 16 Jul 2015 15:43:07 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 92453 invoked by uid 500); 16 Jul 2015 15:43:07 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 92442 invoked by uid 99); 16 Jul 2015 15:43:07 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2015 15:43:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 441201A70AB for ; Thu, 16 Jul 2015 15:43:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.77 X-Spam-Level: * X-Spam-Status: No, score=1.77 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id qmznhRRAjz7v for ; Thu, 16 Jul 2015 15:43:06 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id C4D3D20CF5 for ; Thu, 16 Jul 2015 15:43:05 +0000 (UTC) Received: (qmail 91475 invoked by uid 99); 16 Jul 2015 15:43:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2015 15:43:04 +0000 Date: Thu, 16 Jul 2015 15:43:04 +0000 (UTC) From: "ramkrishna.s.vasudevan (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-2067) Sort order incorrect for variable length DESC columns 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/PHOENIX-2067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14629904#comment-14629904 ] ramkrishna.s.vasudevan commented on PHOENIX-2067: ------------------------------------------------- +1 . Nice tests. Thanks for covering up all the cases [~Dumindux]. [~giacomotaylor] I was trying to suggest this point only in my review. > Sort order incorrect for variable length DESC columns > ----------------------------------------------------- > > Key: PHOENIX-2067 > URL: https://issues.apache.org/jira/browse/PHOENIX-2067 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.4.0 > Environment: HBase 0.98.6-cdh5.3.0 > jdk1.7.0_67 x64 > CentOS release 6.4 (2.6.32-358.el6.x86_64) > Reporter: Mykola Komarnytskyy > Assignee: James Taylor > Fix For: 4.5.0 > > Attachments: PHOENIX-2067-tests.patch, PHOENIX-2067-tests2.patch, PHOENIX-2067_addendum.patch, PHOENIX-2067_array_addendum.patch, PHOENIX-2067_array_addendum_v2.patch, PHOENIX-2067_v1.patch, PHOENIX-2067_v2.patch, PHOENIX-2067_v3.patch > > > Steps to reproduce: > 1. Create a table: > CREATE TABLE mytable (id BIGINT not null PRIMARY KEY, timestamp BIGINT, log_message varchar) IMMUTABLE_ROWS=true, SALT_BUCKETS=16; > 2. Create two indexes: > CREATE INDEX mytable_index_search ON mytable(timestamp,id) INCLUDE (log_message) SALT_BUCKETS=16; > CREATE INDEX mytable_index_search_desc ON mytable(timestamp DESC,id DESC) INCLUDE (log_message) SALT_BUCKETS=16; > 3. Upsert values: > UPSERT INTO mytable VALUES(1, 1434983826018, 'message1'); > UPSERT INTO mytable VALUES(2, 1434983826100, 'message2'); > UPSERT INTO mytable VALUES(3, 1434983826101, 'message3'); > UPSERT INTO mytable VALUES(4, 1434983826202, 'message4'); > 4. Sort DESC by timestamp: > select timestamp,id,log_message from mytable ORDER BY timestamp DESC; > Failure: data is sorted incorrectly. In case when we have two longs which are different only by last two digits (e.g. 1434983826155, 1434983826100) and one of the long ends with '00' we receive incorrect order. > Sorting result: > 1434983826202 > 1434983826100 > 1434983826101 > 1434983826018 -- This message was sent by Atlassian JIRA (v6.3.4#6332)