[
https://issues.apache.org/jira/browse/CASSANDRA-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13619845#comment-13619845
]
Sylvain Lebresne commented on CASSANDRA-5413:
---------------------------------------------
Didn't we said that having our sets sorted meant that they could be used
instead of lists in a lot of places (which is good because lists have some
downsides so should be used sparingly)?
I kind of think that guaranteeing the order can be convenient. Furthermore,
having the order might allow operations like slicing a set or map later on. And
as much as I agree that collections shouldn't be used in replacement of
creating a table, I do believe that being able to slice them can have some use,
if only API-wise (the same way that you can SELECT individual columns). At the
very least, I'm slightly uncomfortable cutting yourselves of the possibility of
adding collection slices one day.
On the other side, while it's true that guaranteeing the order ties somewhat
the implementation, I could be wrong but I'm really not concerned about that in
practice (and it's not like implementing a sorted set/map ties our hands very
strongly, even in the remote hypothesis what we'd change the implementation).
Overall, I like it the way it is and I think that just fixing cqlsh would be
easy. But, just my opinion.
> cqlsh returns map entries in wrong order
> ----------------------------------------
>
> Key: CASSANDRA-5413
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5413
> Project: Cassandra
> Issue Type: Bug
> Components: API, Tools
> Affects Versions: 1.2.3
> Environment: Cassandra 1.2.3 on Ubuntu 12.04, Java(TM) SE Runtime
> Environment (build 1.6.0_43-b01), running in VMWare player 5.0.0 build-812388
> on Windows 7 Professional 32bit
> Reporter: Swav Swiac
> Assignee: Sylvain Lebresne
> Priority: Minor
> Labels: cql3, cqlsh
> Attachments: cqlsh map sort order.txt
>
>
> The elements in the map <timeuuid,decimal> are returned in cqlsh in an order
> that is neither sorted by name, value or timestamp.
> Below is output from cqlsh and cassandra cli. (looks a bit messy here, I have
> attached a text file without word wrapping)
> cqlsh:iBidTest> select * from lots ;
> event_id | lot_id | bids_accepted | bids_details
> | bids_temp
>
>
> | minimum | number | title
> --------------------------------------+--------+---------------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+--------+-----------
> a4a70900-24e1-11df-8924-001ff3591711 | 1 | null | null
> |
>
>
> null | 200 | 2 | New lot 2
> a4a70900-24e1-11df-8924-001ff3591711 | 3 | null | null
> | {8b457e90-9ae2-11e2-9bcb-a1f164a2d4a3: 1000,
> 9606ca50-9ae2-11e2-9bcb-a1f164a2d4a3: 650,
> 908fb640-9ae2-11e2-9bcb-a1f164a2d4a3: 600,
> 7d930650-9ae2-11e2-9bcb-a1f164a2d4a3: 500,
> a1ef7f10-9ae2-11e2-9bcb-a1f164a2d4a3: 1250,
> 9aedd360-9ae2-11e2-9bcb-a1f164a2d4a3: 950} | 100 | 1 | New lot 1
> [default@ibidtest] get lots[a4a70900-24e1-11df-8924-001ff3591711];
> => (column=1:, value=, timestamp=1364829909818000)
> => (column=1:minimum, value=0000000000c8, timestamp=1364829397026000)
> => (column=1:number, value=32, timestamp=1364829909818000)
> => (column=1:title, value=4e6577206c6f742032, timestamp=1364829397026000)
> => (column=3:, value=, timestamp=1364830894466000)
> => (column=3:bids_temp:7d9306509ae211e29bcba1f164a2d4a3, value=0000000001f4,
> timestamp=1364830833463000)
> => (column=3:bids_temp:8b457e909ae211e29bcba1f164a2d4a3, value=0000000003e8,
> timestamp=1364830856441000)
> => (column=3:bids_temp:908fb6409ae211e29bcba1f164a2d4a3, value=000000000258,
> timestamp=1364830865317000)
> => (column=3:bids_temp:9606ca509ae211e29bcba1f164a2d4a3, value=00000000028a,
> timestamp=1364830874485000)
> => (column=3:bids_temp:9aedd3609ae211e29bcba1f164a2d4a3, value=0000000003b6,
> timestamp=1364830882711000)
> => (column=3:bids_temp:a1ef7f109ae211e29bcba1f164a2d4a3, value=0000000004e2,
> timestamp=1364830894466000)
> => (column=3:minimum, value=0000000064, timestamp=1364829412417000)
> => (column=3:number, value=31, timestamp=1364829852020000)
> => (column=3:title, value=4e6577206c6f742031, timestamp=1364829412417000)
> Returned 14 results.
> Elapsed time: 130 msec(s).
--
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