You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Hseu (JIRA)" <ji...@apache.org> on 2009/12/22 15:24:29 UTC

[jira] Created: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

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 should be a list of respective SuperColumn.columns and not a list of SuperColumn.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Hseu (JIRA)" <ji...@apache.org>.
     [ 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.

  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 should be a list of respective SuperColumn.columns and not a list of SuperColumn.


> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Hseu (JIRA)" <ji...@apache.org>.
     [ 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<ColumnOrSuperColumn> 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

  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.


> 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<ColumnOrSuperColumn> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794502#action_12794502 ] 

Jonathan Ellis commented on CASSANDRA-649:
------------------------------------------

the patch for CASSANDRA-647 makes get_range_slice use the same convert-to-thrift format as get_slice and multiget_slice.  If that doesn't fix it, please add a Thrift test to test_server.py showing the problem.  (Running the thrift tests is described in http://wiki.apache.org/cassandra/HowToContribute)

> 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/pycassa ):
> >>> import pycassa
> >>> connect = pycassa.connect()
> >>> cf = pycassa.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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
> 2. The KeySlice in 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.


[jira] Issue Comment Edited: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Hseu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794559#action_12794559 ] 

Jonathan Hseu edited comment on CASSANDRA-649 at 12/25/09 12:08 PM:
--------------------------------------------------------------------

I've attached a patch to test_server.py to unit test the bug.

The old test case depended on the behavior that I indicated, so I replaced that with the expected behavior.

I tested the latest trunk and it seems to still have this issue.

      was (Author: vomjom):
    I've attached a patch to test_server.py to unit test the bug.

The old test case depended on the behavior that I indicated, so I replaced that with the expected behavior.
  
> 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
>         Attachments: 649_unit_test.patch
>
>
> Here's an example using my python library ( http://github.com/vomjom/pycassa ):
> >>> import pycassa
> >>> connect = pycassa.connect()
> >>> cf = pycassa.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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
> 2. The KeySlice in 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.


[jira] Updated: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Hseu (JIRA)" <ji...@apache.org>.
     [ 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/pycassa ):

>>> 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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
2. The KeySlice in 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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
2. The KeySlice in 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/pycassa ):
> >>> 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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
> 2. The KeySlice in 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.


[jira] Updated: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Hseu (JIRA)" <ji...@apache.org>.
     [ 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<ColumnOrSuperColumn> 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<ColumnOrSuperColumn> 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<ColumnOrSuperColumn> 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.


[jira] Updated: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-649:
-------------------------------------

    Attachment: 649.patch

thanks for the test.

patch extracts thriftifyColumnFamily and applies to getSlice and get_slice_range

> 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
>         Attachments: 649.patch, 649_unit_test.patch
>
>
> Here's an example using my python library ( http://github.com/vomjom/pycassa ):
> >>> import pycassa
> >>> connect = pycassa.connect()
> >>> cf = pycassa.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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
> 2. The KeySlice in 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.


[jira] Commented: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Hseu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794564#action_12794564 ] 

Jonathan Hseu commented on CASSANDRA-649:
-----------------------------------------

+1

Works for me.

Thanks.

> 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
>         Attachments: 649.patch, 649_unit_test.patch
>
>
> Here's an example using my python library ( http://github.com/vomjom/pycassa ):
> >>> import pycassa
> >>> connect = pycassa.connect()
> >>> cf = pycassa.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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
> 2. The KeySlice in 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.


[jira] Updated: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Hseu (JIRA)" <ji...@apache.org>.
     [ 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<ColumnOrSuperColumn> 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 the 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<ColumnOrSuperColumn> 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


> 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<ColumnOrSuperColumn> 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 the 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.


[jira] Updated: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Hseu (JIRA)" <ji...@apache.org>.
     [ 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/pycassa ):

>>> import pycassa
>>> connect = pycassa.connect()
>>> cf = pycassa.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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
2. The KeySlice in 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/pycassa ):

>>> 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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
2. The KeySlice in 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/pycassa ):
> >>> import pycassa
> >>> connect = pycassa.connect()
> >>> cf = pycassa.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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
> 2. The KeySlice in 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.


[jira] Updated: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Hseu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Hseu updated CASSANDRA-649:
------------------------------------

    Attachment: 649_unit_test.patch

I've attached a patch to test_server.py to unit test the bug.

The old test case depended on the behavior that I indicated, so I replaced that with the expected behavior.

> 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
>         Attachments: 649_unit_test.patch
>
>
> Here's an example using my python library ( http://github.com/vomjom/pycassa ):
> >>> import pycassa
> >>> connect = pycassa.connect()
> >>> cf = pycassa.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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
> 2. The KeySlice in 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.


[jira] Resolved: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-649.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.5
         Assignee: Jonathan Ellis

committed to 0.5 and trunk

> 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
>            Assignee: Jonathan Ellis
>             Fix For: 0.5
>
>         Attachments: 649.patch, 649_unit_test.patch
>
>
> Here's an example using my python library ( http://github.com/vomjom/pycassa ):
> >>> import pycassa
> >>> connect = pycassa.connect()
> >>> cf = pycassa.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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
> 2. The KeySlice in 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.


[jira] Commented: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794492#action_12794492 ] 

Jonathan Ellis commented on CASSANDRA-649:
------------------------------------------

I'd be a lot more sure that this is a bug in Cassandra rather than an under-tested client library if you stuck to raw Thrift.

> 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/pycassa ):
> >>> import pycassa
> >>> connect = pycassa.connect()
> >>> cf = pycassa.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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
> 2. The KeySlice in 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.


[jira] Updated: (CASSANDRA-649) get_range_slice() behavior is inconsistent with get_slice() and multiget_slice() when super_column is set in ColumnParent

Posted by "Jonathan Hseu (JIRA)" <ji...@apache.org>.
     [ 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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
2. The KeySlice in 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<ColumnOrSuperColumn> 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 the 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<ColumnOrSuperColumn> 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 the list of SuperColumn.columns each wrapped in a ColumnOrSuperColumn
> 2. The KeySlice in 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.