From bcdbb0eb940d7c8b2cb32431cc856c53ed379cff Mon Sep 17 00:00:00 2001 From: Adam Holmberg Date: Wed, 2 Dec 2015 11:23:50 +0100 Subject: [PATCH] Normalize cqlsh DESC output patch by Adam Holmberg; reviewed by Benjamin Lerer for CASSANDRA-10431 --- CHANGES.txt | 1 + bin/cqlsh.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1b3838d351..1b7f3a206b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.1 + * Normalize cqlsh DESC output (CASSANDRA-10431) * Rejects partition range deletions when columns are specified (CASSANDRA-10739) * Fix error when saving cached key for old format sstable (CASSANDRA-10778) * Invalidate prepared statements on DROP INDEX (CASSANDRA-10758) diff --git a/bin/cqlsh.py b/bin/cqlsh.py index 7435f005af..2206427bbb 100644 --- a/bin/cqlsh.py +++ b/bin/cqlsh.py @@ -1546,7 +1546,7 @@ class Shell(cmd.Cmd): functions = filter(lambda f: f.name == functionname, ksmeta.functions.values()) if len(functions) == 0: raise FunctionNotFound("User defined function %r not found" % functionname) - print "\n\n".join(func.as_cql_query(formatted=True) for func in functions) + print "\n\n".join(func.export_as_string() for func in functions) print def describe_aggregates(self, ksname): @@ -1573,7 +1573,7 @@ class Shell(cmd.Cmd): aggregates = filter(lambda f: f.name == aggregatename, ksmeta.aggregates.values()) if len(aggregates) == 0: raise FunctionNotFound("User defined aggregate %r not found" % aggregatename) - print "\n\n".join(aggr.as_cql_query(formatted=True) for aggr in aggregates) + print "\n\n".join(aggr.export_as_string() for aggr in aggregates) print def describe_usertypes(self, ksname): @@ -1601,7 +1601,7 @@ class Shell(cmd.Cmd): usertype = ksmeta.user_types[typename] except KeyError: raise UserTypeNotFound("User type %r not found" % typename) - print usertype.as_cql_query(formatted=True) + print usertype.export_as_string() print def describe_cluster(self):