Skip to content

Conversation

@sandaar
Copy link
Contributor

@sandaar sandaar commented Nov 22, 2025

Revert support for long to int type demotion

Summary

Revert support for long to int type demotion introduced in #590 , #591 and #593 .

All modified files were reverted except for following files:

helper/impls/helper-impl-19/src/main/java/com/linkedin/avroutil1/compatibility/avro19/codec/ResolvingDecoder.java
helper/impls/helper-impl-110/src/main/java/com/linkedin/avroutil1/compatibility/avro110/codec/ResolvingDecoder.java
helper/impls/helper-impl-111/src/main/java/com/linkedin/avroutil1/compatibility/avro111/codec/ResolvingDecoder.java

In those I reverted almost everything except for "implements CustomDecoder" in class definitions because it is referenced in SpecificDatumReaderExt classes.

Any new files that were introduced in those PRs were kept and newly introduced java classes were marked as deprecated.

Details

First two versions (Avro 1.4 and 1.5) I reverted manually, then used copilot to revert the remaining versions. Later I found that I missed some things in manual commits, I didn't realize avro 1.4 and 1.5 files were touched in the last two PRs as well. I used copilot to verify that everything was reverted. Here is the summary:

🔄 Reverted Files

All modified implementation files have been reverted to their pre-commit state:

Adapter Classes (Avro 1.4, 1.6-1.11)

  • Avro14Adapter.java, Avro16Adapter.java, Avro17Adapter.java, Avro18Adapter.java, Avro19Adapter.java, Avro110Adapter.java, Avro111Adapter.java

Codec/Parsing Classes (All versions)

  • AliasAwareSpecificDatumReader.java
  • ResolvingGrammarGenerator.java
  • Symbol.java

Test Files (All versions)

  • AvroCompatibilityHelperAvro14Test.java
  • AvroCompatibilityHelperAvro15Test.java
  • AvroCompatibilityHelperAvro16Test.java
  • AvroCompatibilityHelperAvro17Test.java
  • AvroCompatibilityHelperAvro18Test.java
  • AvroCompatibilityHelperAvro19Test.java
  • AvroCompatibilityHelperAvro110Test.java
  • AvroCompatibilityHelperAvro111Test.java
  • AvroCompatibilityHelperAvro1110Test.java

Codegen Files

  • SpecificRecordClassGenerator.java - Removed numeric conversion constructors
  • SpecificRecordGeneratorUtil.java
  • SpecificRecordTest.java

⚠️ Deprecated Files (Kept)

The following 19 newly added Java classes have been kept but marked with @Deprecated:

Common Classes

  • CustomDecoder.java
  • SpecificRecordBaseExt.java

Avro 1.4

  • GenericDatumReaderExt.java
  • SpecificDatumReaderExt.java

Avro 1.6

  • SpecificDatumReaderExt.java

Avro 1.7

  • GenericDatumReaderExt.java
  • SpecificDatumReaderExt.java

Avro 1.8

  • GenericDatumReaderExt.java
  • SpecificDatumReaderExt.java
  • Avro18GenericDataAccessUtil.java

Avro 1.9

  • GenericDatumReaderExt.java
  • SpecificDatumReaderExt.java
  • Avro19GenericDataAccessUtil.java

Avro 1.10

  • GenericDatumReaderExt.java
  • SpecificDatumReaderExt.java
  • Avro110GenericDataAccessUtil.java

Avro 1.11

  • GenericDatumReaderExt.java
  • SpecificDatumReaderExt.java
  • Avro111GenericDataAccessUtil.java

Testing Done

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_282-msft.jdk/Contents/Home/
./gradlew clean build javadoc --stacktrace --warning-mode all --no-daemon --parallel
./gradlew publishToMavenLocal -Dmaven.repo.local=$HOME/local-repo

built avro-schemas with a snapshot of this repo
built a local mp with a snapshot of avro-schemas

@li-ukumar li-ukumar merged commit a5e1543 into linkedin:master Dec 2, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants