You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/03 23:47:47 UTC

[GitHub] [beam] kennknowles opened a new issue, #19340: There is a NullPointerException when read null-value field in BigQuery table

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

   I run query on a BigQuery table by Beam SQL.
   
   Ex: 
   
   
   ```
   
   BeamSqlRelUtils.toPCollection(pipeline, sqlEnv.parseQuery("SELECT * FROM X_bigquery_table"));
   
   ```
   
   
   
   There is a NullPointerException when it reads null-value field in the BigQuery table as below:
   
   
   ```
   
   Dec 22, 2018 11:05:21 AM org.apache.beam.sdk.io.FileBasedSource createReader
   INFO: Matched 1 files
   for pattern gs://xxx/tmp/BigQueryExtractTemp/a84545971aa94cf6b6717984e9d71642/000000000000.avro
   java.lang.NullPointerException
   
   at org.apache.beam.sdk.io.gcp.bigquery.AvroUtils.convertAvroString(AvroUtils.java:81)
    at org.apache.beam.sdk.io.gcp.bigquery.AvroUtils.convertAvroPrimitiveTypes(AvroUtils.java:104)
   
   at org.apache.beam.sdk.io.gcp.bigquery.AvroUtils.convertAvroFormat(AvroUtils.java:46)
    at org.apache.beam.sdk.io.gcp.bigquery.BigQueryUtils.toBeamRow(BigQueryUtils.java:206)
   
   at org.apache.beam.sdk.io.gcp.bigquery.BigQueryUtils$ToBeamRow.apply(BigQueryUtils.java:198)
    at org.apache.beam.sdk.io.gcp.bigquery.BigQueryUtils$ToBeamRow.apply(BigQueryUtils.java:185)
   
   at org.apache.beam.sdk.io.gcp.bigquery.BigQuerySourceBase$1.apply(BigQuerySourceBase.java:221)
    at
   org.apache.beam.sdk.io.gcp.bigquery.BigQuerySourceBase$1.apply(BigQuerySourceBase.java:214)
    at org.apache.beam.sdk.io.AvroSource$AvroBlock.readNextRecord(AvroSource.java:567)
   
   at org.apache.beam.sdk.io.BlockBasedSource$BlockBasedReader.readNextRecord(BlockBasedSource.java:209)
   
   at org.apache.beam.sdk.io.FileBasedSource$FileBasedReader.advanceImpl(FileBasedSource.java:484)
    at
   org.apache.beam.sdk.io.FileBasedSource$FileBasedReader.startImpl(FileBasedSource.java:479)
    at org.apache.beam.sdk.io.OffsetBasedSource$OffsetBasedReader.start(OffsetBasedSource.java:249)
   
   at org.apache.beam.runners.direct.BoundedReadEvaluatorFactory$BoundedReadEvaluator.processElement(BoundedReadEvaluatorFactory.java:147)
   
   at org.apache.beam.runners.direct.DirectTransformExecutor.processElements(DirectTransformExecutor.java:160)
   
   at org.apache.beam.runners.direct.DirectTransformExecutor.run(DirectTransformExecutor.java:124)
    at
   java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   
   at java.lang.Thread.run(Thread.java:748)
   
   ```
   
   
   
    
   
   Imported from Jira [BEAM-6297](https://issues.apache.org/jira/browse/BEAM-6297). Original Jira may contain additional context.
   Reported by: luat.


-- 
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.apache.org

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