avro icon indicating copy to clipboard operation
avro copied to clipboard

AVRO-4040: [java] @AvroInternal annotation for getSchema() and getSpecificData() methods

Open bgalek opened this issue 1 year ago • 22 comments

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.

bgalek avatar Aug 27 '24 13:08 bgalek

I've fixed spotless error, so build should pass now ;)

bgalek avatar Aug 28 '24 14:08 bgalek

https://github.com/bgalek/avro/actions/runs/10610238789/job/29407344572 it passed on my org ;)

bgalek avatar Aug 29 '24 10:08 bgalek

Any chances for merge? :)

bgalek avatar Sep 10 '24 04:09 bgalek

@opwvhk hi, do we have any ETA for this PR?

bgalek avatar Sep 19 '24 07:09 bgalek

@opwvhk any updates?

bgalek avatar Oct 03 '24 06:10 bgalek

@opwvhk 👋 ? or maybe @belugabehr? :)

bgalek avatar Oct 07 '24 07:10 bgalek

anyone? :)

bgalek avatar Oct 08 '24 23:10 bgalek

@martin-g sure thing, I'll add those tests - will you help me with merging this afterwards? :)

bgalek avatar Oct 09 '24 07:10 bgalek

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 avatar Oct 09 '24 07:10 martin-g

@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. If there is a testuite that I could extend - I would need some directions. Can avro team help me ship this feature in 2024? :)

bgalek avatar Oct 28 '24 21:10 bgalek

Which test(s) cover the Enum and Fixed cases ?

martin-g avatar Oct 29 '24 09:10 martin-g

AFAIK lang/java/avro/src/test/java/org/apache/avro/TypeEnum.java is beeing compared with class generated from avro schema

bgalek avatar Oct 29 '24 10:10 bgalek

maybe you could point me to an example test that I missed that I could extend/blueprint?

bgalek avatar Oct 29 '24 10:10 bgalek

I don't use Java (in general) for several years now ... I really have no idea how those classes are being used/tested. And I don't have the time to investigate ...

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 avatar Oct 29 '24 11:10 martin-g

@martin-g I get it; thank you for your dedication to help! Is there an user that I should mention/ping about this PR? :)

bgalek avatar Oct 29 '24 12:10 bgalek

any chances for update here?

bgalek avatar Nov 14 '24 13:11 bgalek

Is there an user that I should mention/ping about this PR? :)

Everyone from the team is already notified, so there is no need of personal pings. I cannot say why there is no reaction. Maybe lack of time, maybe something else ...

martin-g avatar Nov 19 '24 06:11 martin-g

@martin-g I get it, but even "we won't make it this year" answer is better than no answer ;) I also did not find any clean workaround for my problem (only "semi-bad" ones like harcoding avro field/method names in springdoc...)

bgalek avatar Nov 19 '24 07:11 bgalek

please, can anyone check this small pr?

bgalek avatar Dec 10 '24 21:12 bgalek

is there anyone?

bgalek avatar Dec 17 '24 23:12 bgalek

I get it you're all busy. I understand that my request is not a priority, and I'm patient.

But it hurts when I see commits being pushed (4 hours ago), but my questions/communication is constantly ignored (only @martin-g cared to answer anything (THX)).

We all have plans, and some rely on this feature, but we've been blocked for about half a year! If you don't want this change, tell me - ghosting is not cool.

bgalek avatar Jan 07 '25 08:01 bgalek

Still nothing? :(

bgalek avatar Feb 17 '25 09:02 bgalek