kmjung commented on a change in pull request #11292: [BEAM-9674] Don't specify 
selected fields when fetching BigQuery table size
URL: https://github.com/apache/beam/pull/11292#discussion_r409117833
 
 

 ##########
 File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryStorageSourceBase.java
 ##########
 @@ -149,11 +151,14 @@
       return ImmutableList.of();
     }
 
+    Schema sessionSchema = new 
Schema.Parser().parse(readSession.getAvroSchema().getSchema());
 
 Review comment:
   With this change, we're no longer specifying the list of selected fields to 
the tables.get call from which the BigQuery schema is taken; as a result, we 
get the entire table schema back, so we have to trim it on the client side in 
the case where the client has specified selected fields. The Avro schema is 
returned as part of the read session and contains only the selected fields, so 
we use it as the basis for trimming the BigQuery schema.

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


With regards,
Apache Git Services

Reply via email to