[jira] [Updated] (CASSANDRA-19566) JSON encoded timestamp value does not always match non-JSON encoded value
[ https://issues.apache.org/jira/browse/CASSANDRA-19566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Berenguer Blasi updated CASSANDRA-19566: Reviewers: Berenguer Blasi, Brandon Williams (was: Brandon Williams) > JSON encoded timestamp value does not always match non-JSON encoded value > - > > Key: CASSANDRA-19566 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19566 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Core, Legacy/CQL >Reporter: Bowen Song >Assignee: Stefan Miklosovic >Priority: Normal > Fix For: 4.0.13, 4.1.5, 5.0-beta2, 5.1-alpha1 > > Time Spent: 1h > Remaining Estimate: 0h > > Description: > "SELECT JSON ..." and "toJson(...)" on Cassandra 4.1.4 produces different > date than "SELECT ..." for some timestamp type values. > > Steps to reproduce: > {code:java} > $ sudo docker pull cassandra:4.1.4 > $ sudo docker create --name cass cassandra:4.1.4 > $ sudo docker start cass > $ # wait for the Cassandra instance becomes ready > $ sudo docker exec -ti cass cqlsh > Connected to Test Cluster at 127.0.0.1:9042 > [cqlsh 6.1.0 | Cassandra 4.1.4 | CQL spec 3.4.6 | Native protocol v5] > Use HELP for help. > cqlsh> create keyspace test WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > cqlsh> use test; > cqlsh:test> create table tbl (id int, ts timestamp, primary key (id)); > cqlsh:test> insert into tbl (id, ts) values (1, -1376701920); > cqlsh:test> select tounixtimestamp(ts), ts, tojson(ts) from tbl where id=1; > system.tounixtimestamp(ts) | ts | > system.tojson(ts) > +-+ > -1376701920 | 1533-09-28 12:00:00.00+ | "1533-09-18 > 12:00:00.000Z" > (1 rows) > cqlsh:test> select json * from tbl where id=1; > [json] > - > {"id": 1, "ts": "1533-09-18 12:00:00.000Z"} > (1 rows) > {code} > > Expected behaviour: > The "select ts", "select tojson(ts)" and "select json *" should all produce > the same date. > > Actual behaviour: > The "select ts" produced the "1533-09-28" date but the "select tojson(ts)" > and "select json *" produced the "1533-09-18" date. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-19566) JSON encoded timestamp value does not always match non-JSON encoded value
[ https://issues.apache.org/jira/browse/CASSANDRA-19566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Miklosovic updated CASSANDRA-19566: -- Fix Version/s: 4.0.13 4.1.5 5.0-beta2 5.1-alpha1 (was: 5.x) (was: 4.0.x) (was: 4.1.x) (was: 5.0.x) Since Version: 4.0 Source Control Link: https://github.com/apache/cassandra/commit/fba4a85b971a00e982361282cf6ea46f8ccf0cd1 Resolution: Fixed Status: Resolved (was: Ready to Commit) > JSON encoded timestamp value does not always match non-JSON encoded value > - > > Key: CASSANDRA-19566 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19566 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Core, Legacy/CQL >Reporter: Bowen Song >Assignee: Stefan Miklosovic >Priority: Normal > Fix For: 4.0.13, 4.1.5, 5.0-beta2, 5.1-alpha1 > > Time Spent: 0.5h > Remaining Estimate: 0h > > Description: > "SELECT JSON ..." and "toJson(...)" on Cassandra 4.1.4 produces different > date than "SELECT ..." for some timestamp type values. > > Steps to reproduce: > {code:java} > $ sudo docker pull cassandra:4.1.4 > $ sudo docker create --name cass cassandra:4.1.4 > $ sudo docker start cass > $ # wait for the Cassandra instance becomes ready > $ sudo docker exec -ti cass cqlsh > Connected to Test Cluster at 127.0.0.1:9042 > [cqlsh 6.1.0 | Cassandra 4.1.4 | CQL spec 3.4.6 | Native protocol v5] > Use HELP for help. > cqlsh> create keyspace test WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > cqlsh> use test; > cqlsh:test> create table tbl (id int, ts timestamp, primary key (id)); > cqlsh:test> insert into tbl (id, ts) values (1, -1376701920); > cqlsh:test> select tounixtimestamp(ts), ts, tojson(ts) from tbl where id=1; > system.tounixtimestamp(ts) | ts | > system.tojson(ts) > +-+ > -1376701920 | 1533-09-28 12:00:00.00+ | "1533-09-18 > 12:00:00.000Z" > (1 rows) > cqlsh:test> select json * from tbl where id=1; > [json] > - > {"id": 1, "ts": "1533-09-18 12:00:00.000Z"} > (1 rows) > {code} > > Expected behaviour: > The "select ts", "select tojson(ts)" and "select json *" should all produce > the same date. > > Actual behaviour: > The "select ts" produced the "1533-09-28" date but the "select tojson(ts)" > and "select json *" produced the "1533-09-18" date. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-19566) JSON encoded timestamp value does not always match non-JSON encoded value
[ https://issues.apache.org/jira/browse/CASSANDRA-19566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-19566: - Status: Ready to Commit (was: Review In Progress) > JSON encoded timestamp value does not always match non-JSON encoded value > - > > Key: CASSANDRA-19566 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19566 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Core, Legacy/CQL >Reporter: Bowen Song >Assignee: Stefan Miklosovic >Priority: Normal > Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x > > Time Spent: 0.5h > Remaining Estimate: 0h > > Description: > "SELECT JSON ..." and "toJson(...)" on Cassandra 4.1.4 produces different > date than "SELECT ..." for some timestamp type values. > > Steps to reproduce: > {code:java} > $ sudo docker pull cassandra:4.1.4 > $ sudo docker create --name cass cassandra:4.1.4 > $ sudo docker start cass > $ # wait for the Cassandra instance becomes ready > $ sudo docker exec -ti cass cqlsh > Connected to Test Cluster at 127.0.0.1:9042 > [cqlsh 6.1.0 | Cassandra 4.1.4 | CQL spec 3.4.6 | Native protocol v5] > Use HELP for help. > cqlsh> create keyspace test WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > cqlsh> use test; > cqlsh:test> create table tbl (id int, ts timestamp, primary key (id)); > cqlsh:test> insert into tbl (id, ts) values (1, -1376701920); > cqlsh:test> select tounixtimestamp(ts), ts, tojson(ts) from tbl where id=1; > system.tounixtimestamp(ts) | ts | > system.tojson(ts) > +-+ > -1376701920 | 1533-09-28 12:00:00.00+ | "1533-09-18 > 12:00:00.000Z" > (1 rows) > cqlsh:test> select json * from tbl where id=1; > [json] > - > {"id": 1, "ts": "1533-09-18 12:00:00.000Z"} > (1 rows) > {code} > > Expected behaviour: > The "select ts", "select tojson(ts)" and "select json *" should all produce > the same date. > > Actual behaviour: > The "select ts" produced the "1533-09-28" date but the "select tojson(ts)" > and "select json *" produced the "1533-09-18" date. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-19566) JSON encoded timestamp value does not always match non-JSON encoded value
[ https://issues.apache.org/jira/browse/CASSANDRA-19566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-19566: - Reviewers: Brandon Williams Status: Review In Progress (was: Needs Committer) > JSON encoded timestamp value does not always match non-JSON encoded value > - > > Key: CASSANDRA-19566 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19566 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Core, Legacy/CQL >Reporter: Bowen Song >Assignee: Stefan Miklosovic >Priority: Normal > Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x > > Time Spent: 0.5h > Remaining Estimate: 0h > > Description: > "SELECT JSON ..." and "toJson(...)" on Cassandra 4.1.4 produces different > date than "SELECT ..." for some timestamp type values. > > Steps to reproduce: > {code:java} > $ sudo docker pull cassandra:4.1.4 > $ sudo docker create --name cass cassandra:4.1.4 > $ sudo docker start cass > $ # wait for the Cassandra instance becomes ready > $ sudo docker exec -ti cass cqlsh > Connected to Test Cluster at 127.0.0.1:9042 > [cqlsh 6.1.0 | Cassandra 4.1.4 | CQL spec 3.4.6 | Native protocol v5] > Use HELP for help. > cqlsh> create keyspace test WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > cqlsh> use test; > cqlsh:test> create table tbl (id int, ts timestamp, primary key (id)); > cqlsh:test> insert into tbl (id, ts) values (1, -1376701920); > cqlsh:test> select tounixtimestamp(ts), ts, tojson(ts) from tbl where id=1; > system.tounixtimestamp(ts) | ts | > system.tojson(ts) > +-+ > -1376701920 | 1533-09-28 12:00:00.00+ | "1533-09-18 > 12:00:00.000Z" > (1 rows) > cqlsh:test> select json * from tbl where id=1; > [json] > - > {"id": 1, "ts": "1533-09-18 12:00:00.000Z"} > (1 rows) > {code} > > Expected behaviour: > The "select ts", "select tojson(ts)" and "select json *" should all produce > the same date. > > Actual behaviour: > The "select ts" produced the "1533-09-28" date but the "select tojson(ts)" > and "select json *" produced the "1533-09-18" date. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-19566) JSON encoded timestamp value does not always match non-JSON encoded value
[ https://issues.apache.org/jira/browse/CASSANDRA-19566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Miklosovic updated CASSANDRA-19566: -- Status: Needs Committer (was: Patch Available) > JSON encoded timestamp value does not always match non-JSON encoded value > - > > Key: CASSANDRA-19566 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19566 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Core, Legacy/CQL >Reporter: Bowen Song >Assignee: Stefan Miklosovic >Priority: Normal > Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x > > Time Spent: 0.5h > Remaining Estimate: 0h > > Description: > "SELECT JSON ..." and "toJson(...)" on Cassandra 4.1.4 produces different > date than "SELECT ..." for some timestamp type values. > > Steps to reproduce: > {code:java} > $ sudo docker pull cassandra:4.1.4 > $ sudo docker create --name cass cassandra:4.1.4 > $ sudo docker start cass > $ # wait for the Cassandra instance becomes ready > $ sudo docker exec -ti cass cqlsh > Connected to Test Cluster at 127.0.0.1:9042 > [cqlsh 6.1.0 | Cassandra 4.1.4 | CQL spec 3.4.6 | Native protocol v5] > Use HELP for help. > cqlsh> create keyspace test WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > cqlsh> use test; > cqlsh:test> create table tbl (id int, ts timestamp, primary key (id)); > cqlsh:test> insert into tbl (id, ts) values (1, -1376701920); > cqlsh:test> select tounixtimestamp(ts), ts, tojson(ts) from tbl where id=1; > system.tounixtimestamp(ts) | ts | > system.tojson(ts) > +-+ > -1376701920 | 1533-09-28 12:00:00.00+ | "1533-09-18 > 12:00:00.000Z" > (1 rows) > cqlsh:test> select json * from tbl where id=1; > [json] > - > {"id": 1, "ts": "1533-09-18 12:00:00.000Z"} > (1 rows) > {code} > > Expected behaviour: > The "select ts", "select tojson(ts)" and "select json *" should all produce > the same date. > > Actual behaviour: > The "select ts" produced the "1533-09-28" date but the "select tojson(ts)" > and "select json *" produced the "1533-09-18" date. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-19566) JSON encoded timestamp value does not always match non-JSON encoded value
[ https://issues.apache.org/jira/browse/CASSANDRA-19566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-19566: - Fix Version/s: 4.0.x 4.1.x > JSON encoded timestamp value does not always match non-JSON encoded value > - > > Key: CASSANDRA-19566 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19566 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Core, Legacy/CQL >Reporter: Bowen Song >Assignee: Stefan Miklosovic >Priority: Normal > Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x > > Time Spent: 10m > Remaining Estimate: 0h > > Description: > "SELECT JSON ..." and "toJson(...)" on Cassandra 4.1.4 produces different > date than "SELECT ..." for some timestamp type values. > > Steps to reproduce: > {code:java} > $ sudo docker pull cassandra:4.1.4 > $ sudo docker create --name cass cassandra:4.1.4 > $ sudo docker start cass > $ # wait for the Cassandra instance becomes ready > $ sudo docker exec -ti cass cqlsh > Connected to Test Cluster at 127.0.0.1:9042 > [cqlsh 6.1.0 | Cassandra 4.1.4 | CQL spec 3.4.6 | Native protocol v5] > Use HELP for help. > cqlsh> create keyspace test WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > cqlsh> use test; > cqlsh:test> create table tbl (id int, ts timestamp, primary key (id)); > cqlsh:test> insert into tbl (id, ts) values (1, -1376701920); > cqlsh:test> select tounixtimestamp(ts), ts, tojson(ts) from tbl where id=1; > system.tounixtimestamp(ts) | ts | > system.tojson(ts) > +-+ > -1376701920 | 1533-09-28 12:00:00.00+ | "1533-09-18 > 12:00:00.000Z" > (1 rows) > cqlsh:test> select json * from tbl where id=1; > [json] > - > {"id": 1, "ts": "1533-09-18 12:00:00.000Z"} > (1 rows) > {code} > > Expected behaviour: > The "select ts", "select tojson(ts)" and "select json *" should all produce > the same date. > > Actual behaviour: > The "select ts" produced the "1533-09-28" date but the "select tojson(ts)" > and "select json *" produced the "1533-09-18" date. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-19566) JSON encoded timestamp value does not always match non-JSON encoded value
[ https://issues.apache.org/jira/browse/CASSANDRA-19566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Miklosovic updated CASSANDRA-19566: -- Test and Documentation Plan: CI Status: Patch Available (was: In Progress) this solves it for 5.0 https://github.com/apache/cassandra/pull/3262 I ll run a build to be sure all plays fine. {code} cqlsh> select id, tounixtimestamp(ts), ts, tojson(ts) from test.tbl; id | system.tounixtimestamp(ts) | ts | system.tojson(ts) ++-+ 5 |-125900 | 1571-01-15 09:46:40.00+ | "1571-01-15 09:46:40.000Z" 10 |-125000 | 1573-11-22 01:46:40.00+ | "1573-11-22 01:46:40.000Z" 16 |-122150 | 1582-12-03 16:26:40.00+ | "1582-12-03 16:26:40.000Z" 13 |-122000 | 1583-05-26 07:06:40.00+ | "1583-05-26 07:06:40.000Z" 11 |-124000 | 1577-01-22 11:33:20.00+ | "1577-01-22 11:33:20.000Z" 1 |-125500 | 1572-04-22 08:53:20.00+ | "1572-04-22 08:53:20.000Z" 8 |-125200 | 1573-04-04 14:13:20.00+ | "1573-04-04 14:13:20.000Z" 2 |-125600 | 1571-12-28 15:06:40.00+ | "1571-12-28 15:06:40.000Z" 4 |-125800 | 1571-05-11 03:33:20.00+ | "1571-05-11 03:33:20.000Z" 18 |-122180 | 1582-10-29 23:06:40.00+ | "1582-10-29 23:06:40.000Z" 15 |-122250 | 1582-08-09 22:40:00.00+ | "1582-08-09 22:40:00.000Z" 20 | 1376701920 | 2406-04-05 12:00:00.00+ | "2406-04-05 12:00:00.000Z" 7 |-125300 | 1572-12-09 20:26:40.00+ | "1572-12-09 20:26:40.000Z" 6 |-125400 | 1572-08-16 02:40:00.00+ | "1572-08-16 02:40:00.000Z" 9 |-125100 | 1573-07-29 08:00:00.00+ | "1573-07-29 08:00:00.000Z" 14 |-122500 | 1581-10-24 14:13:20.00+ | "1581-10-24 14:13:20.000Z" 17 |-122200 | 1582-10-06 19:33:20.00+ | "1582-10-06 19:33:20.000Z" 12 |-123000 | 1580-03-24 21:20:00.00+ | "1580-03-24 21:20:00.000Z" 3 |-125700 | 1571-09-03 21:20:00.00+ | "1571-09-03 21:20:00.000Z" {code} > JSON encoded timestamp value does not always match non-JSON encoded value > - > > Key: CASSANDRA-19566 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19566 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Core, Legacy/CQL >Reporter: Bowen Song >Assignee: Stefan Miklosovic >Priority: Normal > Fix For: 5.0.x, 5.x > > Time Spent: 10m > Remaining Estimate: 0h > > Description: > "SELECT JSON ..." and "toJson(...)" on Cassandra 4.1.4 produces different > date than "SELECT ..." for some timestamp type values. > > Steps to reproduce: > {code:java} > $ sudo docker pull cassandra:4.1.4 > $ sudo docker create --name cass cassandra:4.1.4 > $ sudo docker start cass > $ # wait for the Cassandra instance becomes ready > $ sudo docker exec -ti cass cqlsh > Connected to Test Cluster at 127.0.0.1:9042 > [cqlsh 6.1.0 | Cassandra 4.1.4 | CQL spec 3.4.6 | Native protocol v5] > Use HELP for help. > cqlsh> create keyspace test WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > cqlsh> use test; > cqlsh:test> create table tbl (id int, ts timestamp, primary key (id)); > cqlsh:test> insert into tbl (id, ts) values (1, -1376701920); > cqlsh:test> select tounixtimestamp(ts), ts, tojson(ts) from tbl where id=1; > system.tounixtimestamp(ts) | ts | > system.tojson(ts) > +-+ > -1376701920 | 1533-09-28 12:00:00.00+ | "1533-09-18 > 12:00:00.000Z" > (1 rows) > cqlsh:test> select json * from tbl where id=1; > [json] > - > {"id": 1, "ts": "1533-09-18 12:00:00.000Z"} > (1 rows) > {code} > > Expected behaviour: > The "select ts", "select tojson(ts)" and "select json *" should all produce > the same date. > > Actual behaviour: > The "select ts" produced the "1533-09-28" date but the "select tojson(ts)" > and "select json *" produced the "1533-09-18" date. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail:
[jira] [Updated] (CASSANDRA-19566) JSON encoded timestamp value does not always match non-JSON encoded value
[ https://issues.apache.org/jira/browse/CASSANDRA-19566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Miklosovic updated CASSANDRA-19566: -- Bug Category: Parent values: Correctness(12982) Complexity: Normal Component/s: Legacy/Core Legacy/CQL Discovered By: Adhoc Test Fix Version/s: 5.0.x 5.x Severity: Low Assignee: Stefan Miklosovic Status: Open (was: Triage Needed) > JSON encoded timestamp value does not always match non-JSON encoded value > - > > Key: CASSANDRA-19566 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19566 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Core, Legacy/CQL >Reporter: Bowen Song >Assignee: Stefan Miklosovic >Priority: Normal > Fix For: 5.0.x, 5.x > > Time Spent: 10m > Remaining Estimate: 0h > > Description: > "SELECT JSON ..." and "toJson(...)" on Cassandra 4.1.4 produces different > date than "SELECT ..." for some timestamp type values. > > Steps to reproduce: > {code:java} > $ sudo docker pull cassandra:4.1.4 > $ sudo docker create --name cass cassandra:4.1.4 > $ sudo docker start cass > $ # wait for the Cassandra instance becomes ready > $ sudo docker exec -ti cass cqlsh > Connected to Test Cluster at 127.0.0.1:9042 > [cqlsh 6.1.0 | Cassandra 4.1.4 | CQL spec 3.4.6 | Native protocol v5] > Use HELP for help. > cqlsh> create keyspace test WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > cqlsh> use test; > cqlsh:test> create table tbl (id int, ts timestamp, primary key (id)); > cqlsh:test> insert into tbl (id, ts) values (1, -1376701920); > cqlsh:test> select tounixtimestamp(ts), ts, tojson(ts) from tbl where id=1; > system.tounixtimestamp(ts) | ts | > system.tojson(ts) > +-+ > -1376701920 | 1533-09-28 12:00:00.00+ | "1533-09-18 > 12:00:00.000Z" > (1 rows) > cqlsh:test> select json * from tbl where id=1; > [json] > - > {"id": 1, "ts": "1533-09-18 12:00:00.000Z"} > (1 rows) > {code} > > Expected behaviour: > The "select ts", "select tojson(ts)" and "select json *" should all produce > the same date. > > Actual behaviour: > The "select ts" produced the "1533-09-28" date but the "select tojson(ts)" > and "select json *" produced the "1533-09-18" date. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org