Vendor avro-rs as avro, keeping all history#2181
Merged
quodlibetor merged 137 commits intoMaterializeInc:masterfrom Mar 3, 2020
Merged
Vendor avro-rs as avro, keeping all history#2181quodlibetor merged 137 commits intoMaterializeInc:masterfrom
quodlibetor merged 137 commits intoMaterializeInc:masterfrom
Conversation
This also adds support for namespaces and aliases
Use it instead of forcing EncodeAvro to infer a schema.
This should be faster than relying on format!.
Avro requires floats to be encoded with little-endian.
Almost all architectures encode f{32, 64} as little-endian: transmuting
`self` directly instead of converting `to_bits().to_le()` because that
looks prettier :D
Also some code cleanup
This should help automatic conversions with serde's (De)Serialize. And it's less ugly.
Instead of having bit spread across files.
This adds support for Debezium and Kafka's date output format via Chrono's support for Dates. Instead of using chrono we could imagine possibly just parsing to an Int32 and expecting downstream crates to add some semantic layers on top of the Int in their interpretation. One downside to the current implementation (afaict) of avro-rs is that there is no way to expose the various extra complex fields to downstream crates, so while we could parse "logicalType": "date" to a Date variant, correctly parsing the various extended date formats that kafka/debezium provide is impossible without baking them into this code.
Dates (via chrono)
Using try_unfold means we don't need to track the errored bit ourselves.
This prepares for integration with the main Materialize repository.
Fix clippy warnings
This will allow MaterializeInc/materialize to cull some duplicated transitive dependencies.
This mostly moves the benches into a directory that isn't checked by default, since it's not worth making the benches work with criterion right now, but I also don't want to just delete them.
|
|
Contributor
|
LGTM, thanks |
umanwizard
approved these changes
Mar 3, 2020
benesch
added a commit
to benesch/materialize
that referenced
this pull request
Mar 17, 2020
This was introduced in the wrong place in MaterializeInc#2181.
def-
added a commit
to def-/materialize
that referenced
this pull request
Mar 11, 2026
Another one-liner fix, the rest is adding a test. This has been broken since the very beginning: MaterializeInc#2181
def-
added a commit
that referenced
this pull request
Mar 13, 2026
…35426) Another one-liner fix, the rest is adding a test. This has been broken since the very beginning: #2181, but probably only became relevant with Kafka sinks being introduced. > timestamp-micros: logical type annotates an Avro long, where the long stores the number of microseconds from the unix epoch, 1 January 1970 00:00:00.000000. From https://avro.apache.org/docs/1.12.0/specification/#logical-types
antiguru
pushed a commit
to antiguru/materialize
that referenced
this pull request
Mar 26, 2026
…aterializeInc#35426) Another one-liner fix, the rest is adding a test. This has been broken since the very beginning: MaterializeInc#2181, but probably only became relevant with Kafka sinks being introduced. > timestamp-micros: logical type annotates an Avro long, where the long stores the number of microseconds from the unix epoch, 1 January 1970 00:00:00.000000. From https://avro.apache.org/docs/1.12.0/specification/#logical-types
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.