pabloem commented on a change in pull request #13786:
URL: https://github.com/apache/beam/pull/13786#discussion_r562941163



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java
##########
@@ -1488,6 +1490,20 @@ private Result(PCollectionTuple pct) {
        * @return the resources
        */
       public PCollection<JsonArray> getResources() {
+        return resources
+            .apply(
+                "Extract Values",
+                MapElements.into(TypeDescriptor.of(JsonArray.class))
+                    .via((KV<String, JsonArray> in) -> in.getValue()))
+            .setCoder(JsonArrayCoder.of());
+      }

Review comment:
       oh you're right. Good thought.... With that in mind, I am inclined to 
just add both to the Search.Result object when creating it. 
   
   The shortcoming is that we will always running the `MapElements` to discard 
the key; but it should be a cheap operation. The benefit is that it will not 
confuse users in the UI. WDYT?




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


Reply via email to