Skip to content

Vendor avro-rs as avro, keeping all history#2181

Merged
quodlibetor merged 137 commits intoMaterializeInc:masterfrom
quodlibetor:vendor-avro
Mar 3, 2020
Merged

Vendor avro-rs as avro, keeping all history#2181
quodlibetor merged 137 commits intoMaterializeInc:masterfrom
quodlibetor:vendor-avro

Conversation

@quodlibetor
Copy link
Copy Markdown
Contributor

No description provided.

flavray and others added 30 commits December 5, 2017 09:02
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.
benesch and others added 17 commits July 22, 2019 13:27
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.
Using try_unfold means we don't need to track the errored bit ourselves.
This prepares for integration with the main Materialize repository.
This will allow MaterializeInc/materialize to cull some duplicated
transitive dependencies.
…endor"

This reverts commit 25de0df, reversing
changes made to 7ea8a7d.
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.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 3, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 10 committers have signed the CLA.

✅ quodlibetor
✅ benesch
✅ umanwizard
❌ flavray
❌ jaboatman
❌ davidalber
❌ nlopes
❌ jiak94
❌ mikaelstaldal
❌ poros
You have signed the CLA already but the status is still pending? Let us recheck it.

@umanwizard
Copy link
Copy Markdown
Contributor

LGTM, thanks

@quodlibetor quodlibetor merged commit a46809d into MaterializeInc:master Mar 3, 2020
@quodlibetor quodlibetor deleted the vendor-avro branch March 3, 2020 19:29
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.