[ https://issues.apache.org/jira/browse/CASSANDRA-13694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16092937#comment-16092937 ]
Varun Barala edited comment on CASSANDRA-13694 at 7/22/17 2:59 AM: ------------------------------------------------------------------- In order to match with cqlsh input. I added one more date format in `*TimestampSerializer.java*`. Previously default format was `yyyy-MM-dd HH:mmXX` which has minute level precision. In this patch I changed it to `yyyy-MM-dd HH:mm:ss.SSSXX`. I appended at the end of *dateStringPatterns* array to make sure minimum changes. Please do let me know If I didn;t consider any case. Thank you!! was (Author: varuna): In order to match with cqlsh input. I added one more date format in `*TimestampSerializer.java*`. Previously default format was `yyyy-MM-dd HH:mmXX` which has minute level precision. In this patch I changed it to `yyyy-MM-dd HH:mm:ss.SSSSSSXX`. I appended at the end of *dateStringPatterns* array to make sure minimum changes. Please do let me know If I didn;t consider any case. Thank you!! > sstabledump does not show full precision of timestamp columns > ------------------------------------------------------------- > > Key: CASSANDRA-13694 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13694 > Project: Cassandra > Issue Type: Bug > Components: Tools > Environment: Ubuntu 16.04 LTS > Reporter: Tim Reeves > Labels: patch-available > Fix For: 3.7 > > Attachments: CASSANDRA-13694-after-review.patch, CASSANDRA-13694.patch > > > Create a table: > CREATE TABLE test_table ( > unit_no bigint, > event_code text, > active_time timestamp, > ack_time timestamp, > PRIMARY KEY ((unit_no, event_code), active_time) > ) WITH CLUSTERING ORDER BY (active_time DESC) > Insert a row: > INSERT INTO test_table (unit_no, event_code, active_time, ack_time) > VALUES (1234, 'TEST EVENT', toTimestamp(now()), > toTimestamp(now())); > Verify that it is in the database with a full timestamp: > cqlsh:pentaho> select * from test_table; > unit_no | event_code | active_time | ack_time > ---------+------------+---------------------------------+--------------------------------- > 1234 | TEST EVENT | 2017-07-14 14:52:39.919000+0000 | 2017-07-14 > 14:52:39.919000+0000 > (1 rows) > Write file: > nodetool flush > nodetool compact pentaho > Use sstabledump: > treeves@ubuntu:~$ sstabledump > /var/lib/cassandra/data/pentaho/test_table-99ba228068a311e7ac30953b79ac2c3e/mb-2-big-Data.db > [ > { > "partition" : { > "key" : [ "1234", "TEST EVENT" ], > "position" : 0 > }, > "rows" : [ > { > "type" : "row", > "position" : 38, > "clustering" : [ "2017-07-14 15:52+0100" ], > "liveness_info" : { "tstamp" : "2017-07-14T14:52:39.888701Z" }, > "cells" : [ > { "name" : "ack_time", "value" : "2017-07-14 15:52+0100" } > ] > } > ] > } > ] > treeves@ubuntu:~$ > The timestamp in the cluster key, and the regular column, are both truncated > to the minute. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org