beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (BEAM-2406) NullPointerException when writing an empty table to BigQuery
Date Mon, 05 Jun 2017 05:21:04 GMT


ASF GitHub Bot commented on BEAM-2406:

GitHub user reuvenlax opened a pull request:

    [BEAM-2406] Fix NullPointerException when writing an empty table

    When writing to an empty table, BigQueryIO was throwing a NPE because WritePartitions
was returning null. This was a regression in previous behavior.
    R: @jkff 

You can merge this pull request into a Git repository by running:

    $ git pull fix_bq_npe

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3293
commit e7dc19e118f00e3706c15e19ece7e0f34de1d72e
Author: Reuven Lax <>
Date:   2017-06-03T01:29:59Z

    Fix crash.

commit 2c6e4b443110b0fcc1334e9d1fac7493b15a4982
Author: Reuven Lax <>
Date:   2017-06-05T05:11:41Z

    Fix test.


> NullPointerException when writing an empty table to BigQuery
> ------------------------------------------------------------
>                 Key: BEAM-2406
>                 URL:
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-gcp
>    Affects Versions: 2.0.0
>            Reporter: Ben Chambers
>            Assignee: Reuven Lax
>            Priority: Minor
> Originally reported on Stackoverflow:
> It looks like if there is no data to write, then WritePartitions will return a null destination,
as explicitly stated in the comments:
> But, the ConstantTableDestination doesn't turn that into the constant destination as
the comment promises, instead it returns that `null` destination:
> This leads to a null pointer error here since the `tableDestination` is that null result
from calling `getTable`:

This message was sent by Atlassian JIRA

View raw message