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

Bernardo Botella Corbi updated CASSANALYTICS-216:
-------------------------------------------------
                        Authors: Bernardo Botella Corbi
    Test and Documentation Plan: 
https://github.com/apache/cassandra-analytics/pull/255
                         Status: Patch Available  (was: Open)

> 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
>            Assignee: Bernardo Botella Corbi
>            Priority: Normal
>             Fix For: 0.5
>
>
> 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]

Reply via email to