[ https://issues.apache.org/jira/browse/CASSANDRA-18585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17757839#comment-17757839 ]
Stefan Miklosovic commented on CASSANDRA-18585: ----------------------------------------------- [3.0 j8|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2988/workflows/e0bedf8c-6811-4920-b23b-bdc487bcaf9d] [3.11 j8|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2987/workflows/1d7ee3f0-f9c2-45f4-b676-820828c59e19] [4.0 j11|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2989/workflows/75778cfc-8384-47c4-ab93-c8fd861c3455] [4.0 j8|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2989/workflows/e38f3c21-b6a1-418a-b799-eebdb7a336f0] [4.1 j11|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2990/workflows/33ab8bee-b6c0-44af-ac6e-3584280b84d8] [4.1 j8|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2990/workflows/65d794ba-7449-4695-ba56-072bc9589926] [5.0 j17|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2994/workflows/29886a9c-23b1-42c0-b221-e2d16f30dcfc] [5.0 j11|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2994/workflows/f5b229e8-c72a-4ec0-a31b-b9ec97611216] [trunk j17|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2993/workflows/80ac4db3-fc3d-4908-bc39-dfff6ab88871] [trunk j11|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2993/workflows/b3716506-2997-4b80-815d-16ed3e380acb] [~adelapena] > Alter Type does not validate changes like Create Type does > ---------------------------------------------------------- > > Key: CASSANDRA-18585 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18585 > Project: Cassandra > Issue Type: Bug > Components: Cluster/Schema > Reporter: David Capwell > Assignee: Roman Mushchinski > Priority: Normal > Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.x > > Time Spent: 1.5h > Remaining Estimate: 0h > > Create Type attempts to block undesired field types, but this validation is > not cared over to Alter Type Add Field; which allows you to add > unexpected/desired types > {code} > Assertions.assertThatThrownBy(() -> createType("CREATE TYPE %s (f > counter)")).hasRootCauseMessage("A user type cannot contain counters"); > String type = createType(KEYSPACE, "CREATE TYPE %s (a int)"); > schemaChange(String.format("ALTER TYPE %s.%s ADD f counter", KEYSPACE, type)); > UserType udt = > Keyspace.open(KEYSPACE).getMetadata().types.get(UTF8Type.instance.decompose(type)).get(); > logger.warn("UDT: {}", udt); > {code} > {code} > UDT: > org.apache.cassandra.db.marshal.UserType(cql_test_keyspace,747970655f3031,61:org.apache.cassandra.db.marshal.Int32Type,66:org.apache.cassandra.db.marshal.CounterColumnType) > {code} -- 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