BigQueryWriteClient/JsonStreamWriter: missing values for duplicated, nested, proto-incompatible fields #2575
Labels
api: bigquerystorage
Issues related to the googleapis/java-bigquerystorage API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
Steps to reproduce
So 2 parent
STRUCT
fields, both with a single field named1nested
.1
at the beginning is important here, which makes it proto incompatible based on this classJsonStreamWriter
. Here is the gist with samplescala-cli
scriptThe problem is: input contains values for both
parent1.1nested
andparent2.1nested
but in BQ only the first one has correct value. The second one is null. Looks like it's lost somewhere:Code example
From the gist ☝️:
Any following attempt of writing data to
parent1.1nested
is successful, data is not null. Any following attempt of writing data toparent2.1nested
always results in null in BQ.In general, first proto-incompatible field "wins" and any other proto-incompatible field with the same name, living as a nested fields somewhere else, "lose".
The text was updated successfully, but these errors were encountered: