feat(connectors): implement Avro payload support with separate encoder, decoder and transform crates#3141
Open
Tyooughtul wants to merge 5 commits intoapache:masterfrom
Open
feat(connectors): implement Avro payload support with separate encoder, decoder and transform crates#3141Tyooughtul wants to merge 5 commits intoapache:masterfrom
Tyooughtul wants to merge 5 commits intoapache:masterfrom
Conversation
- Add apache-avro dependency to workspace and SDK crate - Extend Payload and Schema enums with Avro variant - Implement AvroStreamDecoder with JSON extraction and raw passthrough - Implement AvroStreamEncoder with JSON-to-Avro conversion and field mappings - Update FlatBuffer and Proto encoders to handle Payload::Avro - Update ProtoConvert transform to support Avro format conversion
- Implement AvroConvert supporting Avro <-> JSON/Text/Raw conversions - Register AvroConvert in TransformType and from_config dispatch
- Add avro_schema_json and avro_schema_path to stream configs - Use AvroStreamDecoder in sink setup for Schema::Avro - Use AvroStreamEncoder in source setup for Schema::Avro
- Base64-encode Payload::Avro with metadata marker for HTTP transport
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3141 +/- ##
=============================================
- Coverage 73.17% 59.64% -13.54%
Complexity 943 943
=============================================
Files 1123 1125 +2
Lines 97892 89792 -8100
Branches 75065 66984 -8081
=============================================
- Hits 71632 53554 -18078
- Misses 23671 33621 +9950
- Partials 2589 2617 +28
🚀 New features to boost your workflow:
|
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.
Which issue does this PR close?
Closes #1846
Rationale
Issue #1846 requested support for Apache Avro as a first-class payload format in connectors, including dedicated StreamEncoder / StreamDecoder implementations and cross-format transformations. This PR delivers that support with schema-driven encoding/decoding and runtime integration.
What changed?
What changed?
Connectors only supported JSON, Raw, Text, Proto and FlatBuffer payloads. Avro data had to be handled as opaque raw bytes without schema validation or format conversion.
So, I added full Avro support across the connector stack, SDK-level AvroStreamEncoder/Decoder with inline/file-based schema loading, a new AvroConvert transform for cross-format conversion, runtime config fields for producers/consumers, and HTTP sink base64 encoding for Avro payloads.
Local Execution
Passed
Ran
AI Usage
I used codex to check the code I wrote, and it helped me discover some bugs and wrote the pr draft.