[AIP-144] Approve the repeated fields AIP. - #476
Conversation
|
"Note: While field masks can not address individual elements in a repeated field, they can address individual elements in a map. Therefore, structured data with a clear primary key may be represented with a map instead." Is this true? while I've seen some proposals to extend field masks to support proto maps, I don't believe that this is supported today. can you clarify this guidance? Thanks! |
|
+1 |
We have definitely had APIs do it, but it would not shock me if they all wrote their own implementations according to the proposal you mentioned. I am not aware of an actual reference implementation (which would be fantastic to have). |
|
Luke, to be more clear, the official spec for field mask: https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/FieldMask does not make any mention of proto maps or give any spec for them. anyone who uses them, is in uncharted territory using their own custom spec. I think field mask should be officially extended to include maps, but until then, I dont think we should recommend such usage. |
|
I am of two minds here. We have a spec (essentially), just not a reference implementation. That said, as the spec is not public, I can see how this is kind of lousy, and this statement is probably unhelpful. I agree with removing it. |
There was a problem hiding this comment.
I think we'll probably want to give more details about the "update via a map" approach at some point, but I'm fine with this as it is for now.
|
@jskeet +1. I think we should get the spec for a field mask extended to include map -- this would be helpful to my team and I'm sure to others as well. |
|
I agree also, but I view it as a separate exercise. |
This issue is intended for public comment, and should remain open through April 24, 2020.