You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/07/29 07:41:04 UTC

[GitHub] [beam] apilloud commented on a change in pull request #12389: [BEAM-10587] Support Maps in BigQuery

apilloud commented on a change in pull request #12389:
URL: https://github.com/apache/beam/pull/12389#discussion_r461975618



##########
File path: sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryUtils.java
##########
@@ -442,6 +450,17 @@ private static Object fromBeamField(FieldType fieldType, Object fieldValue) {
         }
         return convertedItems;
 
+      case MAP:
+        Map<?, ?> pairs = (Map<?, ?>) fieldValue;
+        convertedItems = Lists.newArrayListWithCapacity(pairs.size());
+        for (Map.Entry<?, ?> pair : pairs.entrySet()) {
+          HashMap<String, Object> item = new HashMap<>(2);

Review comment:
       I believe the type you want here is `TableRow`.




----------------------------------------------------------------
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:
users@infra.apache.org