[ https://issues.apache.org/jira/browse/CASSANDRA-18141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17672326#comment-17672326 ]
Brandon Williams commented on CASSANDRA-18141: ---------------------------------------------- Thanks for the patch, this looks spot on! ||Branch||CI|| |[4.0|https://github.com/driftx/cassandra/tree/CASSANDRA-18141-4.0]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/747/workflows/cb20ea90-139c-4eb9-a7ad-e8a85067fbc5], [j11|https://app.circleci.com/pipelines/github/driftx/cassandra/747/workflows/6b8d4517-554a-4a1f-9ab8-56b9764ddeab]| |[4.1|https://github.com/driftx/cassandra/tree/CASSANDRA-18141-4.1]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/745/workflows/436b5f32-3f3a-442f-898f-456edf552111], [j11|https://app.circleci.com/pipelines/github/driftx/cassandra/745/workflows/4a7b4a27-ebda-46d6-826a-50f538769460]| |[trunk|https://github.com/driftx/cassandra/tree/CASSANDRA-18141-trunk]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/746/workflows/882794b7-dfcb-4bfd-abdc-d423b2e6e0ce], [j11|https://app.circleci.com/pipelines/github/driftx/cassandra/746/workflows/21305969-dd10-4edb-8d4f-086367a05001]| > Cqlsh incorrectly formats duration > ---------------------------------- > > Key: CASSANDRA-18141 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18141 > Project: Cassandra > Issue Type: Bug > Components: Tool/cqlsh > Reporter: Maciej Sokol > Assignee: Maciej Sokol > Priority: Normal > Fix For: 4.0.x, 4.1.x, 4.x > > Time Spent: 10m > Remaining Estimate: 0h > > It looks like something broke between C* 3.11 and C* 4.X when it comes to > duration types. > Example: > CREATE KEYSPACE users WITH replication = \{'class': > 'NetworkTopologyStrategy', 'datacenter1': '1'} AND durable_writes = true; > CREATE TABLE users.user_credentials_by_email (email text,la_duration > duration,PRIMARY KEY(email)); > INSERT INTO users.user_credentials_by_email (email, la_duration ) VALUES ( > 'te...@test.com', 12h); > INSERT INTO users.user_credentials_by_email (email, la_duration ) VALUES ( > 'te...@test.com', 12h30m); > INSERT INTO users.user_credentials_by_email (email, la_duration ) VALUES ( > 'te...@test.com', 12h30m30s); > INSERT INTO users.user_credentials_by_email (email, la_duration ) VALUES ( > 'te...@test.com', 12h30m30s250ms); > INSERT INTO users.user_credentials_by_email (email, la_duration ) VALUES ( > 'te...@test.com', PT12H30M); > 3.11: > cassandra@cqlsh> SHOW VERSION ; > [cqlsh 5.0.1 | Cassandra 3.11.15-SNAPSHOT | CQL spec 3.4.4 | Native protocol > v4] > cassandra@cqlsh> SELECT * FROM users.user_credentials_by_email ; > email | la_duration > ----------------+---------------- > te...@test.com | 12h > te...@test.com | 12h30m30s250ms > te...@test.com | 12h30m > te...@test.com | 12h30m > te...@test.com | 12h30m30s > (5 rows) > 4.X: > cassandra@cqlsh> SHOW VERSION ; > [cqlsh 6.0.0 | Cassandra 4.0.8-SNAPSHOT | CQL spec 3.4.5 | Native protocol v5] > cassandra@cqlsh> SELECT * FROM users.user_credentials_by_email ; > email | la_duration > ----------------+----------------------------------------------------- > te...@test.com | 12.0h > te...@test.com | 12.508402777777778h30.504166666666666m30.25s250.0ms > te...@test.com | 12.5h30.0m > te...@test.com | 12.5h30.0m > te...@test.com | 12.508333333333333h30.5m30.0s > (5 rows) -- 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