Bernardo Botella Corbi created CASSANALYTICS-216:
----------------------------------------------------
Summary: CDC Avro schema conversion fails for UDTs with quoted
names containing characters invalid in Avro
Key: CASSANALYTICS-216
URL: https://issues.apache.org/jira/browse/CASSANALYTICS-216
Project: Apache Cassandra Analytics
Issue Type: Bug
Components: CDC
Reporter: Bernardo Botella Corbi
CASSANALYTICS-204 changed the Avro record for a UDT to be named after the UDT.
It had been the constant record_udt. The name is now
userType.getNameAsString(), passed unchanged to SchemaBuilder.record(...) and
into the nested namespace in CqlToAvroSchemaConverterImplementation.schemaFrom.
Quoted CQL identifiers can contain any character, but Avro names must match
[A-Za-z_][A-Za-z0-9_]*. A UDT such as CREATE TYPE "my-type" (id text) therefore
makes convert(CqlTable) throw for any table that uses it. This is a regression,
because before CASSANALYTICS-204 the UDT's own name never reached Avro.
The proposed fix is to sanitize those names and avoid collisions appending a
number to those names.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]