prodriguezdefino commented on code in PR #32512:
URL: https://github.com/apache/beam/pull/32512#discussion_r1801672188


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryUtils.java:
##########
@@ -403,7 +403,7 @@ private static List<TableFieldSchema> 
toTableFieldSchema(Schema schema) {
       }
       if (type.getTypeName().isCollectionType()) {
         type = 
Preconditions.checkArgumentNotNull(type.getCollectionElementType());
-        if (type.getTypeName().isCollectionType() || 
type.getTypeName().isMapType()) {
+        if (type.getTypeName().isCollectionType() && 
!type.getTypeName().isMapType()) {

Review Comment:
   BigQuery only supports arrays of structs and scalar types, not nested 
collection/map types. 
   
   This change enables storing a simple map or an array of maps (after 
flattening them) as a repeated struct field. 
   
   A separated change may help to support flattening other collection types 
(arrays of arrays for example). 



-- 
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]

Reply via email to