fix(codecs): Support avro date values#24774
fix(codecs): Support avro date values#24774omwbennett wants to merge 4 commits intovectordotdev:masterfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
1ecf525 to
40d0d6a
Compare
40d0d6a to
aa24899
Compare
|
Hey @vectordotdev/vector, appreciate if you could review this PR, thanks! |
|
@codex review Hi @omwbennett, thanks for contributing to Vector. I enabled the workflows and requested a first pass from codex. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 857b4b3903
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1 @@ | |||
| {"name":"test","type":"record","fields":[{"name":"date_field","type":{"type":"int"}}]} No newline at end of file | |||
There was a problem hiding this comment.
Preserve logicalType in date fixture schema
roundtrip_avro_fixtures reads this .avsc as the schema, but the new fixture stores date_field as plain int ({"type":{"type":"int"}}) rather than an Avro date logical type. That means decoding this fixture produces AvroValue::Int, so the new AvroValue::Date branch added in try_from is never exercised by tests; regressions in real logicalType: "date" inputs could pass CI unnoticed. Please keep the fixture schema with logicalType: "date" on the field type object so the test validates the intended path.
Useful? React with 👍 / 👎.
Summary
Fixes #24773 by adding support for decoding Avro date values.
Vector configuration
How did you test this PR?
Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References
Closes #24773
Notes
@vectordotdev/vectorto reach out to us regarding this PR.pre-pushhook, please see this template.make fmtmake check-clippy(if there are failures it's possible some of them can be fixed withmake clippy-fix)make testgit merge origin masterandgit push.Cargo.lock), pleaserun
make build-licensesto regenerate the license inventory and commit the changes (if any). More details here.