Strikerrx01 commented on code in PR #34135:
URL: https://github.com/apache/beam/pull/34135#discussion_r1979377991
##########
sdks/python/apache_beam/io/gcp/bigquery_tools.py:
##########
@@ -1599,31 +1648,31 @@ def beam_row_from_dict(row: dict, schema):
beam_row = {}
for field in schema.fields:
name = field.name
- mode = field.mode.upper()
- type = field.type.upper()
- # When writing with Storage Write API via xlang, we give the Beam Row
- # PCollection a hint on the schema using `with_output_types`.
- # This requires that each row has all the fields in the schema.
- # However, it's possible that some nullable fields don't appear in the row.
- # For this case, we create the field with a `None` value
- # None is also set when a repeated field is missing as BigQuery
- # converts Null Repeated fields to empty lists
Review Comment:
@stankiewicz You're right about the removed comment in `beam_row_from_dict`.
The comment about Storage Write API and nullable fields was accidentally
removed during reordering. I'll restore it as it provides important context
about the behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]