kennknowles opened a new issue, #18445:
URL: https://github.com/apache/beam/issues/18445

   When running a query against BigQueryIO with a REPEATED RECORD field the 
behavior is different between DirectRunner and DataflowRunner. The field 
containing the repeated record has to be cast to access the records. Apparently 
the following implementations work for each runner but I would expect them to 
be the same as my pipeline otherwise only runs on one.
   
   DirectRunner:
   
   ```
   
   ArrayList<LinkedHashMap> orderLines = (ArrayList<LinkedHashMap>) 
c.element().get("RepeatedField");
   
   ```
   
   
   
   DataflowRunner:
   
   ```
   
   ImmutableList<TableRow> orderLines = (ImmutableList<TableRow>) 
c.element().get("RepeatedField");
   
   ```
   
   
                                
   
   For example when using the ImmutableList implementation on DirectRunner the 
following exception is thrown:
   
   ```
   
   java.lang.ClassCastException: java.util.ArrayList cannot be cast to 
com.google.common.collect.ImmutableList
   
   ```
   
   
   
   Imported from Jira 
[BEAM-2767](https://issues.apache.org/jira/browse/BEAM-2767). Original Jira may 
contain additional context.
   Reported by: jroxtheworld.


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

Reply via email to