Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Source][NativeJsonConveter] Use logical types instead of names to select the proper type converter #85

Open
aymkhalil opened this issue Aug 16, 2022 · 0 comments

Comments

@aymkhalil
Copy link
Contributor

For logical types, the AVRO schema.getLogicalType() always returns null although the name of the logical type is populated. The NativeJsonConverter for now relies on the schema.getName() instead to select the right converter. Some debugging is required to decide why the logical type is not populated. Here is an example:

   {
        "name": "xdecimal",
        "type": [
          "null",
          {
            "type": "record",
            "name": "cql_decimal",
            "namespace": "",
            "fields": [
              {
                "name": "bigint",
                "type": "bytes"
              },
              {
                "name": "scale",
                "type": "int"
              }
            ],
            "logicalType": "cql_decimal"
          }
        ]
      }

schema.getLogicalType() is expected to return cql_decimal but it returns null instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant