-
Notifications
You must be signed in to change notification settings - Fork 1.6k
BundleSerializer changes for Protobuf migration #7999
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
BundleSerializer changes for Protobuf migration #7999
Conversation
ce5fcb5
to
759187f
Compare
Generated by 🚫 Danger |
@@ -522,13 +526,13 @@ BundledQuery BundleSerializer::DecodeBundledQuery( | |||
|
|||
auto start_at_bound = DecodeBound(reader, structured_query, "startAt"); | |||
std::shared_ptr<Bound> start_at; | |||
if (!start_at_bound.position().empty()) { | |||
if (start_at_bound.position().values_count) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, it is probably just me, but i always found adding a > 0
helps readability..optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
return rpc_serializer_.DecodeReference(&reader, ref_string); | ||
google_firestore_v1_ArrayValue array_value{}; | ||
SetRepeatedField(&array_value.values, &array_value.values_count, values, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the behavior changed..there was an early exit if decoding a value failed. But maybe it does not matter..if there is no easy way to bring that back, I am OK to leave it as it is now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It not as easy anymore to do the validation since I am generally just passing through the protos. I could handle bundles differently, but for now I prefer to keep the current handling (and show a warning in DocumentSnapshot.data())
40321d2
to
c6a9340
Compare
This is part of #7904. It will break the feature branch, but I am planning to send out small reviewable chunks with an end goal of a feature branch that passes CI.
This PR changes the Bundle serializer to serialize into NanoPB.