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

Avro IDL timestamp_ms support #43

Closed
mpataki opened this issue Apr 7, 2020 · 2 comments
Closed

Avro IDL timestamp_ms support #43

mpataki opened this issue Apr 7, 2020 · 2 comments

Comments

@mpataki
Copy link
Contributor

mpataki commented Apr 7, 2020

The maven-acvo-schema-plugin appears not to support the Avro IDL timestamp_ms logic type, while the avro-maven-plugin and Avro IDL itself, does.

I've put this repository together to demonstrate the issue: https://github.com/mpataki/avdl-demo

The error that is produced is as follows:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.823 s
[INFO] Finished at: 2020-04-07T11:44:28-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.spf4j:maven-avro-schema-plugin:8.8.0:avro-compile (default-avro-compile) on project avdl-demo: cannot add mvnId to  IDL /home/mat/code/avdl-demo/src/main/avro/A.avdl, Unable to resolve com.example.avro.timestamp_ms -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

And if you switch to using the avro-maven-plugin, the project works as expected.

@zolyfarkas
Copy link
Owner

That is because timestamp_ms is a construct that is missing in the avro fork used by default.

the way to declare this type in idl:

@logicalType("timestamp_ms") long fieldName;

I prefer this syntax because it is clearer what the type actually is...

you can also switch to use the official avro lib if you desire support for those logical type shortcuts...just update the plugin's avro lib dependency.

@mpataki
Copy link
Contributor Author

mpataki commented Apr 7, 2020

understood, thanks. I'll close this issue if this is working as intended from your perspective.

@mpataki mpataki closed this as completed Apr 7, 2020
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

2 participants