[jira] [Updated] (CASSANDRA-14853) Change default timestamp format to output only milliseconds, not microseconds

2020-08-14 Thread Brandon Williams (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-14853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams updated CASSANDRA-14853:
-
  Fix Version/s: 4.0-beta2
Source Control Link: 
https://github.com/apache/cassandra/commit/139ad44e8b53ed194ba4b47fbfae3484015034f9
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

I agree this should be fixed on the server side later.  Committed doc changes 
for now, thanks.

> Change default timestamp format to output only milliseconds, not microseconds
> -
>
> Key: CASSANDRA-14853
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14853
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tool/cqlsh
> Environment: Reproduced in trunk
>Reporter: Alex Ott
>Priority: Normal
>  Labels: cqlsh
> Fix For: 4.0-beta2
>
>
> By default cqlsh outputs the timestamp column with microseconds precision, 
> like this:
> {noformat}
> cqlsh:test> create table t1(tm timestamp primary key, t text);
> cqlsh:test> insert into t1(tm, t) values(toTimestamp(now()), 't');
> cqlsh:test> insert into t1(tm, t) values(toTimestamp(now()), 't2');
> cqlsh:test> SELECT * from t1;
>  tm  | t
> -+
>  2018-10-27 18:01:54.738000+ | t2
>  2018-10-27 18:01:52.599000+ |  t
> (2 rows)
> {noformat}
> But if I want to use the value that is output on the screen in my query, I 
> get an error:
> {noformat}
> cqlsh:test> select * from t1 where tm = '2018-10-27 18:01:54.738000+';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Unable 
> to coerce '2018-10-27 18:01:54.738000+' to a formatted date (long)"
> {noformat}
> But if I manually round it to milliseconds, then everything works:
> {noformat}
> cqlsh:test> select * from t1 where tm = '2018-10-27 18:01:54.738+';
>  tm  | t
> -+
>  2018-10-27 18:01:54.738000+ | t2
> (1 rows)
> {noformat}
> It would be much easier user's experience if we use the same format for 
> output & input data, because right now this leads to errors, that often not 
> really understandable by novice users.
> P.S. I know about cqlshrc, but not every user has it configured.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14853) Change default timestamp format to output only milliseconds, not microseconds

2020-08-14 Thread Brandon Williams (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-14853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams updated CASSANDRA-14853:
-
Status: Ready to Commit  (was: Review In Progress)

> Change default timestamp format to output only milliseconds, not microseconds
> -
>
> Key: CASSANDRA-14853
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14853
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tool/cqlsh
> Environment: Reproduced in trunk
>Reporter: Alex Ott
>Priority: Normal
>  Labels: cqlsh
>
> By default cqlsh outputs the timestamp column with microseconds precision, 
> like this:
> {noformat}
> cqlsh:test> create table t1(tm timestamp primary key, t text);
> cqlsh:test> insert into t1(tm, t) values(toTimestamp(now()), 't');
> cqlsh:test> insert into t1(tm, t) values(toTimestamp(now()), 't2');
> cqlsh:test> SELECT * from t1;
>  tm  | t
> -+
>  2018-10-27 18:01:54.738000+ | t2
>  2018-10-27 18:01:52.599000+ |  t
> (2 rows)
> {noformat}
> But if I want to use the value that is output on the screen in my query, I 
> get an error:
> {noformat}
> cqlsh:test> select * from t1 where tm = '2018-10-27 18:01:54.738000+';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Unable 
> to coerce '2018-10-27 18:01:54.738000+' to a formatted date (long)"
> {noformat}
> But if I manually round it to milliseconds, then everything works:
> {noformat}
> cqlsh:test> select * from t1 where tm = '2018-10-27 18:01:54.738+';
>  tm  | t
> -+
>  2018-10-27 18:01:54.738000+ | t2
> (1 rows)
> {noformat}
> It would be much easier user's experience if we use the same format for 
> output & input data, because right now this leads to errors, that often not 
> really understandable by novice users.
> P.S. I know about cqlshrc, but not every user has it configured.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14853) Change default timestamp format to output only milliseconds, not microseconds

2020-08-13 Thread Brandon Williams (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-14853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams updated CASSANDRA-14853:
-
Reviewers: Brandon Williams, Brandon Williams  (was: Brandon Williams)
   Brandon Williams, Brandon Williams
   Status: Review In Progress  (was: Patch Available)

> Change default timestamp format to output only milliseconds, not microseconds
> -
>
> Key: CASSANDRA-14853
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14853
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tool/cqlsh
> Environment: Reproduced in trunk
>Reporter: Alex Ott
>Priority: Normal
>  Labels: cqlsh
>
> By default cqlsh outputs the timestamp column with microseconds precision, 
> like this:
> {noformat}
> cqlsh:test> create table t1(tm timestamp primary key, t text);
> cqlsh:test> insert into t1(tm, t) values(toTimestamp(now()), 't');
> cqlsh:test> insert into t1(tm, t) values(toTimestamp(now()), 't2');
> cqlsh:test> SELECT * from t1;
>  tm  | t
> -+
>  2018-10-27 18:01:54.738000+ | t2
>  2018-10-27 18:01:52.599000+ |  t
> (2 rows)
> {noformat}
> But if I want to use the value that is output on the screen in my query, I 
> get an error:
> {noformat}
> cqlsh:test> select * from t1 where tm = '2018-10-27 18:01:54.738000+';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Unable 
> to coerce '2018-10-27 18:01:54.738000+' to a formatted date (long)"
> {noformat}
> But if I manually round it to milliseconds, then everything works:
> {noformat}
> cqlsh:test> select * from t1 where tm = '2018-10-27 18:01:54.738+';
>  tm  | t
> -+
>  2018-10-27 18:01:54.738000+ | t2
> (1 rows)
> {noformat}
> It would be much easier user's experience if we use the same format for 
> output & input data, because right now this leads to errors, that often not 
> really understandable by novice users.
> P.S. I know about cqlshrc, but not every user has it configured.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14853) Change default timestamp format to output only milliseconds, not microseconds

2020-08-13 Thread Brandon Williams (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-14853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams updated CASSANDRA-14853:
-
Authors: Adam Holmberg
Test and Documentation Plan: docs
 Status: Patch Available  (was: In Progress)

> Change default timestamp format to output only milliseconds, not microseconds
> -
>
> Key: CASSANDRA-14853
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14853
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tool/cqlsh
> Environment: Reproduced in trunk
>Reporter: Alex Ott
>Priority: Normal
>  Labels: cqlsh
>
> By default cqlsh outputs the timestamp column with microseconds precision, 
> like this:
> {noformat}
> cqlsh:test> create table t1(tm timestamp primary key, t text);
> cqlsh:test> insert into t1(tm, t) values(toTimestamp(now()), 't');
> cqlsh:test> insert into t1(tm, t) values(toTimestamp(now()), 't2');
> cqlsh:test> SELECT * from t1;
>  tm  | t
> -+
>  2018-10-27 18:01:54.738000+ | t2
>  2018-10-27 18:01:52.599000+ |  t
> (2 rows)
> {noformat}
> But if I want to use the value that is output on the screen in my query, I 
> get an error:
> {noformat}
> cqlsh:test> select * from t1 where tm = '2018-10-27 18:01:54.738000+';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Unable 
> to coerce '2018-10-27 18:01:54.738000+' to a formatted date (long)"
> {noformat}
> But if I manually round it to milliseconds, then everything works:
> {noformat}
> cqlsh:test> select * from t1 where tm = '2018-10-27 18:01:54.738+';
>  tm  | t
> -+
>  2018-10-27 18:01:54.738000+ | t2
> (1 rows)
> {noformat}
> It would be much easier user's experience if we use the same format for 
> output & input data, because right now this leads to errors, that often not 
> really understandable by novice users.
> P.S. I know about cqlshrc, but not every user has it configured.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14853) Change default timestamp format to output only milliseconds, not microseconds

2019-02-16 Thread C. Scott Andreas (JIRA)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-14853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

C. Scott Andreas updated CASSANDRA-14853:
-
Component/s: (was: Dependencies)
 Tool/cqlsh

> Change default timestamp format to output only milliseconds, not microseconds
> -
>
> Key: CASSANDRA-14853
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14853
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tool/cqlsh
> Environment: Reproduced in trunk
>Reporter: Alex Ott
>Priority: Major
>  Labels: cqlsh
>
> By default cqlsh outputs the timestamp column with microseconds precision, 
> like this:
> {noformat}
> cqlsh:test> create table t1(tm timestamp primary key, t text);
> cqlsh:test> insert into t1(tm, t) values(toTimestamp(now()), 't');
> cqlsh:test> insert into t1(tm, t) values(toTimestamp(now()), 't2');
> cqlsh:test> SELECT * from t1;
>  tm  | t
> -+
>  2018-10-27 18:01:54.738000+ | t2
>  2018-10-27 18:01:52.599000+ |  t
> (2 rows)
> {noformat}
> But if I want to use the value that is output on the screen in my query, I 
> get an error:
> {noformat}
> cqlsh:test> select * from t1 where tm = '2018-10-27 18:01:54.738000+';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Unable 
> to coerce '2018-10-27 18:01:54.738000+' to a formatted date (long)"
> {noformat}
> But if I manually round it to milliseconds, then everything works:
> {noformat}
> cqlsh:test> select * from t1 where tm = '2018-10-27 18:01:54.738+';
>  tm  | t
> -+
>  2018-10-27 18:01:54.738000+ | t2
> (1 rows)
> {noformat}
> It would be much easier user's experience if we use the same format for 
> output & input data, because right now this leads to errors, that often not 
> really understandable by novice users.
> P.S. I know about cqlshrc, but not every user has it configured.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org