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 other supported types, excepts any 
collection/map type. 
   
   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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to