Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expr: Add protobuf for chrono types #11801

Merged
merged 1 commit into from
Apr 15, 2022

Conversation

lluki
Copy link
Contributor

@lluki lluki commented Apr 14, 2022

Add Protobuf support for chrono::types: NaiveDate, NaiveTime, NaiveDatetime, DateTime<Utc>, FixedOffset and, DateTimeUnits.

Fixes MaterializeInc/database-issues#3439

Tracked in MaterializeInc/database-issues#3419

@lluki lluki requested a review from aalexandrov April 14, 2022 12:36
@lluki
Copy link
Contributor Author

lluki commented Apr 14, 2022

I did not yet change the existing Row encoding. As I split types into Date and Time, it will definitely change their binary encoding.

Copy link
Contributor

@aalexandrov aalexandrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lluki I am going to merge this after squashing the following fixup commits in order to unblock progress on the #11745 sub-issues:

  • 49c732d DateTime<Utc> and NaiveDateTime can share the same protobuf representation.
  • c7a0eba Increase the number of test cases to 4096 from the default 256.
  • ca219ca + bf7aa09 Move custom proptest strategy definitions for all chrono types from crate::proto::chrono to crate::chrono (the former is intended to be used only for $T ⇔ Proto$T type conversions).

I will keep the commits around in aalexandrov/platform_expr_proto_datetime in case you have objections and want to revert some of these changes when you are back.

@aalexandrov aalexandrov force-pushed the platform_expr_proto_datetime branch 2 times, most recently from 783116b to e819d1f Compare April 15, 2022 12:29
@aalexandrov aalexandrov enabled auto-merge April 15, 2022 12:30
- Implement `ProtoRepr` for the various `chrono` that are
  transitively needed for the protobuf-ization of `ComputeCommand`.
- Add custom `proptest::strategy::Strategy` implementations for
  those types.
- Add `Proto$T` and conversion trait implementations for some of
  the types located in `mz_repr::datetime`.
@aalexandrov aalexandrov force-pushed the platform_expr_proto_datetime branch from e819d1f to d02d3fa Compare April 15, 2022 13:01
@aalexandrov aalexandrov self-assigned this Apr 15, 2022
@aalexandrov aalexandrov added C-feature Category: new feature or request A-compute Area: compute labels Apr 15, 2022
@aalexandrov aalexandrov merged commit dcc7708 into MaterializeInc:main Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compute Area: compute C-feature Category: new feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants