Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6AFD9200C5C for ; Thu, 20 Apr 2017 09:57:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 69215160B9F; Thu, 20 Apr 2017 07:57:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B08E1160B91 for ; Thu, 20 Apr 2017 09:57:10 +0200 (CEST) Received: (qmail 35804 invoked by uid 500); 20 Apr 2017 07:57:09 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 35785 invoked by uid 99); 20 Apr 2017 07:57:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Apr 2017 07:57:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 78B2CCD885 for ; Thu, 20 Apr 2017 07:57:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id AP3KjKxipyt1 for ; Thu, 20 Apr 2017 07:57:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 138E360DD2 for ; Thu, 20 Apr 2017 07:57:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5DA4EE05A2 for ; Thu, 20 Apr 2017 07:57:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 128DC21B53 for ; Thu, 20 Apr 2017 07:57:04 +0000 (UTC) Date: Thu, 20 Apr 2017 07:57:04 +0000 (UTC) From: "Andrew Jefferson (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-13462) Unexpected behaviour with range queries on UUIDs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 20 Apr 2017 07:57:11 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15976267#comment-15976267 ] Andrew Jefferson commented on CASSANDRA-13462: ---------------------------------------------- Thanks for the response. I understand that this won't change because of the way the clustering relates to sorting on disk. I'm aware that sorting of timeuuids is important. Because timeuuid and uuid are documented as different types and can be specified explicitly on a column I had thought that the time-based sorting would only apply if I did: ``` CREATE TABLE time_sorted ( pk int PRIMARY KEY, ck timeuuid, val int ); ``` I had hoped that this would not force time-uuid style comparison: ``` CREATE TABLE if_only_it_were_value_sorted ( pk int PRIMARY KEY, ck uuid, val int ); ``` > Unexpected behaviour with range queries on UUIDs > ------------------------------------------------ > > Key: CASSANDRA-13462 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13462 > Project: Cassandra > Issue Type: Bug > Reporter: Andrew Jefferson > > My expectation is that UUIDs should behave as 128 bit integers for comparison. > However it seems that the Cassandra implementation compares first the uuid version number, then the remaining values of the uuid. > e.g. in C* > 10000000-0000-3000-0000-000000000000 > is greater than > 20000000-0000-1000-0000-000000000000 > (n.b. the 13th value is the uuid version) > - this is consistent across range queries and using ORDER BY -- This message was sent by Atlassian JIRA (v6.3.15#6346)