mirror of https://github.com/apache/cassandra
Fix formatting of duration columns in CQLSH
patch by Akhil Mehra; reviewed by Benjamin Lerer for CASSANDRA-13549
This commit is contained in:
parent
60c2004963
commit
5a860a70f2
|
|
@ -1,4 +1,5 @@
|
|||
3.11.0
|
||||
* Fix formatting of duration columns in CQLSH (CASSANDRA-13549)
|
||||
* Fix the problem with duplicated rows when using paging with SASI (CASSANDRA-13302)
|
||||
* Allow CONTAINS statements filtering on the partition key and it’s parts (CASSANDRA-13275)
|
||||
* Fall back to even ranges calculation in clusters with vnodes when tokens are distributed unevenly (CASSANDRA-13229)
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -396,11 +396,7 @@ def format_value_time(val, colormap, **_):
|
|||
|
||||
@formatter_for('Duration')
|
||||
def format_value_duration(val, colormap, **_):
|
||||
buf = six.iterbytes(val)
|
||||
months = decode_vint(buf)
|
||||
days = decode_vint(buf)
|
||||
nanoseconds = decode_vint(buf)
|
||||
return format_python_formatted_type(duration_as_str(months, days, nanoseconds), colormap, 'duration')
|
||||
return format_python_formatted_type(duration_as_str(val.months, val.days, val.nanoseconds), colormap, 'duration')
|
||||
|
||||
|
||||
def duration_as_str(months, days, nanoseconds):
|
||||
|
|
|
|||
Loading…
Reference in New Issue