You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "Abacn (via GitHub)" <gi...@apache.org> on 2023/07/31 14:25:34 UTC

[GitHub] [beam] Abacn commented on a diff in pull request #27619: use toBeamRowFieldValue for list recursion in toBeamValue

Abacn commented on code in PR #27619:
URL: https://github.com/apache/beam/pull/27619#discussion_r1279379104


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryUtils.java:
##########
@@ -710,7 +710,7 @@ public static Row toBeamRow(Schema rowSchema, TableSchema bqSchema, TableRow jso
                       (!innerTypeIsMap && v instanceof Map)
                           ? ((Map<String, Object>) v).get("v")
                           : v)
-              .map(v -> toBeamValue(fieldType.getCollectionElementType(), v))
+              .map(v -> toBeamRowFieldValue(Field.of("v", fieldType.getCollectionElementType()), v))

Review Comment:
   This worked in an (ad hoc) way that calling methods intended for other uses (Row values) for List values. It also adds some overhead (construct a dumb Field in place) and. Can we add support to null value in toBeamValue instead?



-- 
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-unsubscribe@beam.apache.org

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