Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(bigquery/storage/managedwriter/adapt): schema->protodescriptor (#…
…6267) This PR addresses a transitive dependency loss when working with nested messages. Previously, we only constructed a descriptor using the direct dependencies, and this changes the implementation to use the cache of all encountered descriptors rather than the local list of dependencies. There's still some opportunities for improvement with regards to proto3, in particular the wrapper types. However, I'm deferring that until we have that sorted out in the backend a bit better. This also changes the testing slightly. I've added a comment to the test as well, but our problem is evaluating the dependencies for correctness. Due to the dynamic nature of how descriptors are created we cannot use something like proto.Equal. To address this, we make two comparisons. In the first, we check the descriptor directly without its dependencies. In the second, we call the normalizer to give us a self-contained descriptor proto, where we can validate everything is present. The gap here of course is that a bug in the normalizer may mask a problem with the conversion, so consideration is warranted when we revisit this. Fixes: #6258 Co-authored-by: Steffany Brown <30247553+steffnay@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
246 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters