[ 
https://issues.apache.org/jira/browse/BEAM-10587?focusedWorklogId=471536&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-471536
 ]

ASF GitHub Bot logged work on BEAM-10587:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Aug/20 15:30
            Start Date: 17/Aug/20 15:30
    Worklog Time Spent: 10m 
      Work Description: rworley-monster commented on a change in pull request 
#12389:
URL: https://github.com/apache/beam/pull/12389#discussion_r471559168



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryUtils.java
##########
@@ -443,6 +467,17 @@ public static TableRow toTableRow(Row row) {
         }
         return convertedItems;
 
+      case MAP:
+        Map<?, ?> pairs = (Map<?, ?>) fieldValue;
+        convertedItems = Lists.newArrayListWithCapacity(pairs.size());
+        for (Map.Entry<?, ?> pair : pairs.entrySet()) {
+          convertedItems.add(
+              new TableRow()
+                  .set(BIGQUERY_MAP_KEY_FIELD_NAME, pair.getKey())

Review comment:
       Nice catch.  I've updated it with that and tried to copy the above 
ITERABLE conversion as closely as possible.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 471536)
    Time Spent: 2h 40m  (was: 2.5h)

> Support Maps in BigQuery
> ------------------------
>
>                 Key: BEAM-10587
>                 URL: https://issues.apache.org/jira/browse/BEAM-10587
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-gcp
>            Reporter: Ryan Worley
>            Assignee: Ryan Worley
>            Priority: P2
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Maps are currently not supported when converting a Beam Schema to a BigQuery 
> TableFieldSchema.  This improvement will convert Maps to repeated records 
> with 'key' and 'value' fields.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to