-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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-4040: [java] @AvroInternal annotation for getSchema() and getSpecificData() methods #3124
base: main
Are you sure you want to change the base?
Conversation
I've fixed spotless error, so build should pass now ;) |
https://github.com/bgalek/avro/actions/runs/10610238789/job/29407344572 it passed on my org ;) |
lang/java/avro/src/main/java/org/apache/avro/specific/AvroInternal.java
Outdated
Show resolved
Hide resolved
…fic/AvroInternal.java Co-authored-by: Oscar Westra van Holthe - Kind <[email protected]>
Any chances for merge? :) |
@opwvhk hi, do we have any ETA for this PR? |
@opwvhk any updates? |
@opwvhk 👋 ? |
anyone? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am OK with the changes but I'd prefer adding a test case(s) that uses reflection to verify that the two methods have this new annotation for classes generated from Record, Fixed and Enum schemas.
@martin-g sure thing, I'll add those tests - will you help me with merging this afterwards? :) |
I am trying to not step on my Java mates' toes but I think I could help you here ! ;-) |
@martin-g I've gone through the repo test suites, and it seems that relevant tests that I've updated are already covering my case since they compare an avro-generated Java class with its java-compiled counterpart. |
Which test(s) cover the Enum and Fixed cases ? |
AFAIK |
maybe you could point me to an example test that I missed that I could extend/blueprint? |
I don't use Java (in general) for several years now ... I just wanted to see a new test that introduces some record, enum and fixed schemas, generates .java classes for them and then uses reflection to verify the existence of the new annotation. I'm afraid you will have to wait someone from the Java team to take a look. |
@martin-g I get it; thank you for your dedication to help! |
any chances for update here? |
Everyone from the team is already notified, so there is no need of personal pings. |
@martin-g I get it, but even "we won't make it this year" answer is better than no answer ;) |
please, can anyone check this small pr? |
is there anyone? |
What is the purpose of the change
This pull request introduces
@AvroInternal
annotation interface that serves only to identify the semantics of being something internal/avro specific.Thanks to this indicator annotation, class processors can ignore those avro-specific fields not coming from user defined schema.
Fixes https://issues.apache.org/jira/browse/AVRO-4040
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Documentation
I think we could mention this interface in some docs.