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

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

                Author: ASF GitHub Bot
            Created on: 30/Jun/21 21:19
            Start Date: 30/Jun/21 21:19
    Worklog Time Spent: 10m 
      Work Description: TheNeuralBit commented on a change in pull request 
#14586:
URL: https://github.com/apache/beam/pull/14586#discussion_r661816697



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
##########
@@ -591,6 +591,7 @@ public static Read read() {
         .setParseFn(parseFn)
         .setMethod(Method.DEFAULT)
         .setUseAvroLogicalTypes(false)
+        .setFormat(DataFormat.DATA_FORMAT_UNSPECIFIED)

Review comment:
       ```suggestion
           .setFormat(DataFormat.AVRO)
   ```
   
   The default should be specified here, instead of relying on execution time 
code.

##########
File path: 
examples/java/src/main/java/org/apache/beam/examples/cookbook/BigQueryTornadoes.java
##########
@@ -179,14 +180,16 @@ static void runBigQueryTornadoes(Options options) {
                   BigQueryIO.readTableRows()
                       .fromQuery(options.getInputQuery())
                       .usingStandardSql()
-                      .withMethod(Method.DIRECT_READ));
+                      .withMethod(Method.DIRECT_READ)
+                      .withFormat(DataFormat.AVRO));
         } else {
           rowsFromBigQuery =
               p.apply(
                   BigQueryIO.readTableRows()
                       .from(options.getInput())
                       .withMethod(Method.DIRECT_READ)
-                      .withSelectedFields(Lists.newArrayList("month", 
"tornado")));
+                      .withSelectedFields(Lists.newArrayList("month", 
"tornado"))
+                      .withFormat(DataFormat.AVRO));

Review comment:
       Ah, sorry, I didn't realize that 
https://github.com/apache/beam/pull/14586#discussion_r659087861 was the only 
place where you were handling the default, normally we specify defaults in the 
IO creator methods (see comment above).
   
   Please remove the `.withFormat(DataFormat.AVRO)`. 




-- 
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: [email protected]

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


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

    Worklog Id:     (was: 617299)
    Time Spent: 70h 50m  (was: 70h 40m)

> BigQuery IO should support reading Arrow format over Storage API
> ----------------------------------------------------------------
>
>                 Key: BEAM-8933
>                 URL: https://issues.apache.org/jira/browse/BEAM-8933
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-gcp
>            Reporter: Kirill Kozlov
>            Assignee: Miguel Anzo
>            Priority: P3
>          Time Spent: 70h 50m
>  Remaining Estimate: 0h
>
> As of right now BigQuery uses Avro format for reading and writing.
> We should add a config to BigQueryIO to specify which format to use: Arrow or 
> Avro (with Avro as default).



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

Reply via email to