Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR cleans up the Avro codec API in schema-avro by renaming AvroBinaryCodec to AvroCodec and refactoring derivation logic in AvroFormat accordingly, with accompanying updates to tests, docs, and benchmarks.
Changes:
- Replace
AvroBinaryCodecwithAvroCodecacross the Avro module and update codec derivation inAvroFormat. - Update Avro-related tests/utilities and documentation to reference
AvroCodec. - Update Avro benchmarks to use the renamed codec type.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| schema-avro/src/test/scala/zio/blocks/schema/avro/AvroTestUtils.scala | Update test helpers to use AvroCodec and cache derived codecs by schema. |
| schema-avro/src/test/scala/zio/blocks/schema/avro/AvroFormatSpec.scala | Update custom injected codecs in tests to implement AvroCodec. |
| schema-avro/src/main/scala/zio/blocks/schema/avro/AvroFormat.scala | Switch Deriver from AvroBinaryCodec to AvroCodec and refactor record encoding/decoding dispatch. |
| schema-avro/src/main/scala/zio/blocks/schema/avro/AvroCodec.scala | Rename/reshape the codec abstraction and companion codecs under AvroCodec. |
| docs/reference/formats.md | Update format summary and schema generation text to reference AvroCodec. |
| docs/reference/codec.md | Update the codec hierarchy diagram to reference AvroCodec. |
| benchmarks/src/main/scala/zio/blocks/schema/avro/AvroNestedRecordsBenchmark.scala | Update benchmark type references to AvroCodec. |
| benchmarks/src/main/scala/zio/blocks/schema/avro/AvroListOfRecordsBenchmark.scala | Update benchmark to AvroCodec (but currently introduces an import name conflict). |
Comments suppressed due to low confidence (1)
schema-avro/src/main/scala/zio/blocks/schema/avro/AvroCodec.scala:35
AvroBinaryCodecwas renamed/replaced with the publicAvroCodectype, but the new public abstract class currently has no Scaladoc. To keep docs consistent with other codecs (e.g.,JsonCodec), please add Scaladoc describing whatAvroCodecdoes, howdecodeUnsafe/encoderelate toBinaryDecoder/BinaryEncoder, and include an example of deriving a codec viaAvroFormatplus accessingavroSchema.
benchmarks/src/main/scala/zio/blocks/schema/avro/AvroListOfRecordsBenchmark.scala
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.