-
Notifications
You must be signed in to change notification settings - Fork 117
Description
Protobuf allows for nesting different message (or enum) types in a way where different types can have the same name. For example:
message A {
message X {
// X fields
}
X x = 1;
}
message B {
message X {
// X fields
}
X x = 1;
}In this case, Protobuf type name resolution ensures that the x field on type A has type A.X and the x field on type B has type B.X. However, both A.X and B.X are said to have the name "X"; they only can be differentiated when looking at the full name.
Our schema template language does not create such nesting of structs within messages, so any one using the Relational Layer with the DDL will not see problems that look like this. However, if the user has imported a Protobuf-based RecordMetaData into the Relational Layer, then queries that reference both X-valued types hit errors. In particular, during type repository construction, we try to create multiple entries with the name "X", one for each outer type.
At this point, we actually may be able to avoid looking through nested columns recursively, as the types are supposed to generally be anonymous anyway.