cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [10/10] cassandra git commit: Merge branch 'cassandra-3.5' into trunk
Date Fri, 11 Mar 2016 22:50:45 GMT
Merge branch 'cassandra-3.5' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0ac03a20
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0ac03a20
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0ac03a20

Branch: refs/heads/trunk
Commit: 0ac03a20c013e93d978ddf5cdf2e645be18de410
Parents: 8097d39 de44900
Author: Yuki Morishita <yukim@apache.org>
Authored: Fri Mar 11 16:47:49 2016 -0600
Committer: Yuki Morishita <yukim@apache.org>
Committed: Fri Mar 11 16:47:49 2016 -0600

----------------------------------------------------------------------
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0ac03a20/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0ac03a20/bin/cqlsh.py
----------------------------------------------------------------------
diff --cc bin/cqlsh.py
index f8cd32d,3cdeb35..3be72b4
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@@ -1328,16 -1373,14 +1328,21 @@@ class Shell(cmd.Cmd)
      def print_static_result(self, column_names, rows, table_meta):
          if not column_names and not table_meta:
              return
+ 
          column_names = column_names or table_meta.columns.keys()
+         formatted_names = [self.myformat_colname(name, table_meta) for name in column_names]
+         if not rows:
+             # print header only
+             self.print_formatted_result(formatted_names, None)
+             return
 -        formatted_values = [map(self.myformat_value, row.values()) for row in rows]
 +
 +        cql_types = []
 +        if table_meta:
 +            ks_meta = self.conn.metadata.keyspaces[table_meta.keyspace_name]
 +            cql_types = [CqlType(table_meta.columns[c].cql_type, ks_meta)
 +                         if c in table_meta.columns else None for c in column_names]
 +
-         formatted_names = [self.myformat_colname(name, table_meta) for name in column_names]
 +        formatted_values = [map(self.myformat_value, row.values(), cql_types) for row in
rows]
  
          if self.expand_enabled:
              self.print_formatted_result_vertically(formatted_names, formatted_values)


Mime
View raw message