Return-Path: Delivered-To: apmail-incubator-cassandra-commits-archive@minotaur.apache.org Received: (qmail 67044 invoked from network); 22 Dec 2009 14:39:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Dec 2009 14:39:01 -0000 Received: (qmail 32931 invoked by uid 500); 22 Dec 2009 14:39:01 -0000 Delivered-To: apmail-incubator-cassandra-commits-archive@incubator.apache.org Received: (qmail 32893 invoked by uid 500); 22 Dec 2009 14:39:00 -0000 Mailing-List: contact cassandra-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-commits@incubator.apache.org Received: (qmail 32877 invoked by uid 99); 22 Dec 2009 14:39:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Dec 2009 14:39:00 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Dec 2009 14:38:49 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 77C2A234C1EE for ; Tue, 22 Dec 2009 06:38:29 -0800 (PST) Message-ID: <355088274.1261492709489.JavaMail.jira@brutus> Date: Tue, 22 Dec 2009 14:38:29 +0000 (UTC) From: "Jonathan Hseu (JIRA)" To: cassandra-commits@incubator.apache.org Subject: [jira] Updated: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent In-Reply-To: <1586601310.1261491869478.JavaMail.jira@brutus> 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/CASSANDRA-649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Hseu updated CASSANDRA-649: ------------------------------------ Description: Here's an example using my python library ( http://github.com/vomjom/pycasso ): >>> import pycasso >>> connect = pycasso.connect() >>> cf = pycasso.ColumnFamily(connect, 'Test Keyspace', 'Test Super', super=True) >>> cf.insert('key1', {'2': {'sub3': 'val3', 'sub4': 'val4'}}) >>> cf.get('key1') {'2': {'sub4': 'val4', 'sub3': 'val3'}} >>> cf.get('key1', super_column='2') {'sub4': 'val4', 'sub3': 'val3'} >>> cf.multiget(['key1']) {'key1': {'2': {'sub4': 'val4', 'sub3': 'val3'}}} >>> cf.multiget(['key1'], super_column='2') {'key1': {'sub4': 'val4', 'sub3': 'val3'}} >>> list(cf.get_range()) [('key1', {'2': {'sub4': 'val4', 'sub3': 'val3'}})] >>> list(cf.get_range(super_column='2')) [('key1', {'2': {'sub4': 'val4', 'sub3': 'val3'}})] In the last case, I expected: [('key1', {'sub4': 'val4', 'sub3': 'val3'})] If the super_column argument is supplied, then all of these make a ColumnParent with: cp = ColumnParent(column_family=self.column_family, super_column=super_column) Or basically, in the KeySlice returned by get_range_slice(), if super_column was set in the passed in the ColumnParent, the columns member of the KeySlice should be a list of respective SuperColumn.columns and not a list of SuperColumn. Another way to describe the problem: get_slice(), multiget_slice(), and get_range_slice() all return: list in their return values in some way or another. If super_column is set in the ColumnParent then: 1. get_slice() and multiget_slice() return a list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn 2. get_range_slice() returns a list of ONE SuperColumn wrapped in a ColumnOrSuperColumn was: Here's an example using my python library ( http://github.com/vomjom/pycasso ): >>> import pycasso >>> connect = pycasso.connect() >>> cf = pycasso.ColumnFamily(connect, 'Test Keyspace', 'Test Super', super=True) >>> cf.insert('key1', {'2': {'sub3': 'val3', 'sub4': 'val4'}}) >>> cf.get('key1') {'2': {'sub4': 'val4', 'sub3': 'val3'}} >>> cf.get('key1', super_column='2') {'sub4': 'val4', 'sub3': 'val3'} >>> cf.multiget(['key1']) {'key1': {'2': {'sub4': 'val4', 'sub3': 'val3'}}} >>> cf.multiget(['key1'], super_column='2') {'key1': {'sub4': 'val4', 'sub3': 'val3'}} >>> list(cf.get_range()) [('key1', {'2': {'sub4': 'val4', 'sub3': 'val3'}})] >>> list(cf.get_range(super_column='2')) [('key1', {'2': {'sub4': 'val4', 'sub3': 'val3'}})] In the last case, I expected: [('key1', {'sub4': 'val4', 'sub3': 'val3'})] If the super_column argument is supplied, then all of these make a ColumnParent with: cp = ColumnParent(column_family=self.column_family, super_column=super_column) Or basically, in the KeySlice returned by get_range_slice(), if super_column was set in the passed in the ColumnParent, the columns member of the KeySlice should be a list of respective SuperColumn.columns and not a list of SuperColumn. Another way to describe the problem: get_slice(), multiget_slice(), and get_range_slice() all return: list in their return values in some way or another. If super_column is set in the ColumnParent then, for each ColumnOrSuperColumn 1. get_slice() and multiget_slice() return a list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn 2. get_range_slice() returns a list of ONE SuperColumn wrapped in a ColumnOrSuperColumn > get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent > ------------------------------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-649 > URL: https://issues.apache.org/jira/browse/CASSANDRA-649 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 0.5 > Environment: Linux > Reporter: Jonathan Hseu > > Here's an example using my python library ( http://github.com/vomjom/pycasso ): > >>> import pycasso > >>> connect = pycasso.connect() > >>> cf = pycasso.ColumnFamily(connect, 'Test Keyspace', 'Test Super', super=True) > >>> cf.insert('key1', {'2': {'sub3': 'val3', 'sub4': 'val4'}}) > >>> cf.get('key1') > {'2': {'sub4': 'val4', 'sub3': 'val3'}} > >>> cf.get('key1', super_column='2') > {'sub4': 'val4', 'sub3': 'val3'} > >>> cf.multiget(['key1']) > {'key1': {'2': {'sub4': 'val4', 'sub3': 'val3'}}} > >>> cf.multiget(['key1'], super_column='2') > {'key1': {'sub4': 'val4', 'sub3': 'val3'}} > >>> list(cf.get_range()) > [('key1', {'2': {'sub4': 'val4', 'sub3': 'val3'}})] > >>> list(cf.get_range(super_column='2')) > [('key1', {'2': {'sub4': 'val4', 'sub3': 'val3'}})] > In the last case, I expected: > [('key1', {'sub4': 'val4', 'sub3': 'val3'})] > If the super_column argument is supplied, then all of these make a ColumnParent with: > cp = ColumnParent(column_family=self.column_family, super_column=super_column) > Or basically, in the KeySlice returned by get_range_slice(), if super_column was set in the passed in the ColumnParent, the columns member of the KeySlice should be a list of respective SuperColumn.columns and not a list of SuperColumn. > Another way to describe the problem: > get_slice(), multiget_slice(), and get_range_slice() all return: > list in their return values in some way or another. > If super_column is set in the ColumnParent then: > 1. get_slice() and multiget_slice() return a list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn > 2. get_range_slice() returns a list of ONE SuperColumn wrapped in a ColumnOrSuperColumn -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.