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

Extension type not preserved on reading from the serialized schema #38891

Closed
candiduslynx opened this issue Nov 27, 2023 · 5 comments
Closed

Comments

@candiduslynx
Copy link
Contributor

Describe the bug, including details regarding any error messages, version, and platform.

I have an extension type json that is defined as an extension over binary.
When I serialize the schema I see that the field is correctly serialized as Extension(json, BINARY).

When reading the serialized schema back the filed type for json column becomes BINARY.

I suppose it's because https://github.com/apache/arrow/blame/main/java/format/src/main/java/org/apache/arrow/flatbuf/Type.java doesn't support reading extension types properly.

Component(s)

Java

kodiakhq bot pushed a commit to cloudquery/plugin-sdk-java that referenced this issue Nov 27, 2023
@danepitkin
Copy link
Contributor

Hi @candiduslynx , do you have a code snippet to reproduce the issue by chance?

The flatbuffer generated file you linked to is expected not to have the ExtensionType defined there. Instead, it is defined here

public abstract static class ExtensionType extends ComplexType {

@danepitkin
Copy link
Contributor

By chance, is the test case not registering the JSON extension type e.g. https://github.com/search?q=repo%3Acloudquery%2Fplugin-sdk-java%20ExtensionTypeRegistry&type=code ?

I haven't actually tested anything yet, just looked through the code a bit so far.

@candiduslynx
Copy link
Contributor Author

By chance, is the test case not registering the JSON extension type e.g. https://github.com/search?q=repo%3Acloudquery%2Fplugin-sdk-java%20ExtensionTypeRegistry&type=code ?

I haven't actually tested anything yet, just looked through the code a bit so far.

Seems like it.
Thanks for looking into it!

@danepitkin
Copy link
Contributor

No problem! Glad I could help.

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

No branches or pull requests

2 participants