Repository: cassandra Updated Branches: refs/heads/trunk e5c4e5e6a -> bcd921c3c
cqlsh: Fix display of -infinity Patch by Adam Holmberg; reviewed by Tyler Hobbs for CASSANDRA-10523 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/02f88e38 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/02f88e38 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/02f88e38 Branch: refs/heads/trunk Commit: 02f88e38e1f148286cf2f6383d65d9d0f3697a08 Parents: bc1058f Author: Adam Holmberg <adam.holmb...@datastax.com> Authored: Wed Oct 14 11:17:50 2015 -0500 Committer: Tyler Hobbs <tylerlho...@gmail.com> Committed: Wed Oct 14 11:17:50 2015 -0500 ---------------------------------------------------------------------- CHANGES.txt | 1 + pylib/cqlshlib/formatting.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/02f88e38/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 1338c6f..b16acb5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.12 + * (cqlsh) Distinguish negative and positive infinity in output (CASSANDRA-10523) * (cqlsh) allow custom time_format for COPY TO (CASSANDRA-8970) * Don't allow startup if the node's rack has changed (CASSANDRA-10242) * (cqlsh) show partial trace if incomplete after max_trace_wait (CASSANDRA-7645) http://git-wip-us.apache.org/repos/asf/cassandra/blob/02f88e38/pylib/cqlshlib/formatting.py ---------------------------------------------------------------------- diff --git a/pylib/cqlshlib/formatting.py b/pylib/cqlshlib/formatting.py index 1049f00..79e661b 100644 --- a/pylib/cqlshlib/formatting.py +++ b/pylib/cqlshlib/formatting.py @@ -156,7 +156,7 @@ def format_floating_point_type(val, colormap, float_precision, **_): if math.isnan(val): bval = 'NaN' elif math.isinf(val): - bval = 'Infinity' + bval = 'Infinity' if val > 0 else '-Infinity' else: exponent = int(math.log10(abs(val))) if abs(val) > sys.float_info.epsilon else -sys.maxint - 1 if -4 <= exponent < float_precision: