-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(avro-decimal-format): add configurable serialization for Avro de…
…cimals (#281) * feat(avro-decimal-format): add configurable serialization for Avro decimals Issue : #280 Clients using the http-sink connector often cannot handle Base64-encoded Avro decimals. This enhancement introduces a configurable option (`avro.decimal.format`) allowing users to choose between `BASE64` (default) and `NUMERIC` serialization formats. - Preserves the existing Base64 behavior by default. - Enables direct numeric representation for improved compatibility with JSON-based consumers. - Reduces the need for additional conversions on the target system. This change enhances flexibility and ensures broader consumer support for Avro decimal values. * test: Add decimal value conversion tests in RecordValueConverter - Introduce parameterized tests verifying both NUMERIC and BASE64 decimal formats. - Cover multiple scales (e.g., 2, 3, 5) for realistic decimal usage. - Validate correct serialization in arrays, nested fields, and single fields. - Ensure no conditional logic in test methods; all scenarios driven by @CsvSource. * chore: Remove dangling comment * chore: rename test variable from `finalSnippet` to `expectedValue` for clarity * chore: fix lint * chore: rename `avro.decimal.format` to `decimal.format` --------- Co-authored-by: Maycon <maycon_comput@yahoo.com.br>
- Loading branch information
1 parent
ad0abbe
commit 9b94970
Showing
10 changed files
with
300 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.