You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2013/04/02 21:11:00 UTC
[1/2] git commit: cqlsh: Print maps ordered by key, sort sets
Updated Branches:
refs/heads/trunk ae1f7be73 -> 493fccd18
cqlsh: Print maps ordered by key, sort sets
patch by Aleksey Yeschenko; reviewed by Brandon Williams for
CASSANDRA-5413
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3f883bf4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3f883bf4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3f883bf4
Branch: refs/heads/trunk
Commit: 3f883bf4d514cf8175d5d7bcbb6af16908905bdb
Parents: 4f75875
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Tue Apr 2 22:08:59 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Tue Apr 2 22:08:59 2013 +0300
----------------------------------------------------------------------
CHANGES.txt | 1 +
pylib/cqlshlib/formatting.py | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f883bf4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7e906ce..58ba39a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -18,6 +18,7 @@
* Fix writetime/ttl functions on null values (CASSANDRA-5341)
* Fix NPE during cql3 select with token() (CASSANDRA-5404)
* IndexHelper.skipBloomFilters won't skip non-SHA filters (CASSANDRA-5385)
+ * cqlsh: Print maps ordered by key, sort sets (CASSANDRA-5413)
Merged from 1.1:
* cli: Quote ks and cf names in schema output when needed (CASSANDRA-5052)
* Fix bad default for min/max timestamp in SSTableMetadata (CASSANDRA-5372)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f883bf4/pylib/cqlshlib/formatting.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/formatting.py b/pylib/cqlshlib/formatting.py
index b970eb9..a3d4666 100644
--- a/pylib/cqlshlib/formatting.py
+++ b/pylib/cqlshlib/formatting.py
@@ -202,7 +202,7 @@ def format_value_list(val, encoding, colormap, time_format, float_precision, sub
@formatter_for('set')
def format_value_set(val, encoding, colormap, time_format, float_precision, subtypes, nullval, **_):
- return format_simple_collection(subtypes[0], val, '{', '}', encoding, colormap,
+ return format_simple_collection(subtypes[0], sorted(val), '{', '}', encoding, colormap,
time_format, float_precision, nullval)
@formatter_for('map')
@@ -213,7 +213,7 @@ def format_value_map(val, encoding, colormap, time_format, float_precision, subt
nullval=nullval)
subkeytype, subvaltype = subtypes
- subs = [(subformat(k, subkeytype), subformat(v, subvaltype)) for (k, v) in val.items()]
+ subs = [(subformat(k, subkeytype), subformat(v, subvaltype)) for (k, v) in sorted(val.items())]
bval = '{' + ', '.join(k.strval + ': ' + v.strval for (k, v) in subs) + '}'
lb, comma, colon, rb = [colormap['collection'] + s + colormap['reset']
for s in ('{', ', ', ': ', '}')]
[2/2] git commit: Merge branch 'cassandra-1.2' into trunk
Posted by al...@apache.org.
Merge branch 'cassandra-1.2' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/493fccd1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/493fccd1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/493fccd1
Branch: refs/heads/trunk
Commit: 493fccd1879dd532aab00d254bb642ba0762c310
Parents: ae1f7be 3f883bf
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Tue Apr 2 22:10:46 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Tue Apr 2 22:10:46 2013 +0300
----------------------------------------------------------------------
CHANGES.txt | 1 +
pylib/cqlshlib/formatting.py | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/493fccd1/CHANGES.txt
----------------------------------------------------------------------