Alexey Raga created AVRO-4008:
---------------------------------

             Summary: Avrogen tool fails on "unknown" logical types
                 Key: AVRO-4008
                 URL: https://issues.apache.org/jira/browse/AVRO-4008
             Project: Apache Avro
          Issue Type: Bug
          Components: csharp
    Affects Versions: 1.11.3
            Reporter: Alexey Raga


Avro specification says:

 
{code:java}
Language implementations must ignore unknown logical types when reading, and 
should use the underlying Avro type. If a logical type is invalid, for example 
a decimal with scale greater than its precision, then implementations should 
ignore the logical type and use the underlying Avro type.{code}
 

However, Avrogen tool for Dotnet (csharp) fails when it meets an "unknown" 
logical type.

For example, generating code for this field:
{code:java}
{ 
  "name": "email", 
  "type": { 
    "type": "string", 
    "logicalType": "encrypted-string" 
  } 
}{code}
fails with this error:
{code:java}
Exception occurred. Logical type 'encrypted-string' is not supported.{code}
while, according to the spec, it should fall back to the underlying type 
(string).

It'd be much nicer if Avrogen would ignore unknown logical types and would 
generate fields of an underlying type instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to