Skip to content

Type: Bug Not Streaming Null Values #3424

Description

@surabhikannan

Bigquery insertAll operation is checking for a field in the inserted Row which is not present in the schema. I have set setIgnoreUnknownValues to true and also set setSkipInvalidRows to true.

Here is the exception Trace,

java.lang.NullPointerException: null value in entry: xyz=null
    at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:33) ~[bqstream.jar:?]
    at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:69) ~[bqstream.jar:?]
    at com.google.common.collect.RegularImmutableMap.fromEntries(RegularImmutableMap.java:46) ~[bqstream.jar:?]
    at com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:354) ~[bqstream.jar:?]
    at com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:327) ~[bqstream.jar:?]
    at com.google.cloud.bigquery.InsertAllRequest$RowToInsert.<init>(InsertAllRequest.java:81) ~[bqstream.jar:?]
    at com.google.cloud.bigquery.InsertAllRequest$RowToInsert.of(InsertAllRequest.java:141) ~[bqstream.jar:?]
    at com.XXXXXXXXXX.bqstream.data.Data.lambda$getData$0(Data.java:46) ~[bqstream.jar:?]
    at java.util.ArrayList.forEach(Unknown Source) ~[?:1.8.0_141]
    at com.XXXXXXXXXX.bqstream.data.Data.getData(Data.java:34) [bqstream.jar:?]
    at com.XXXXXXXXXX.bqstream.BatchProcessor.apply(BatchProcessor.java:22) [bqstream.jar:?]
    at com.XXXXXXXXXX.mdaolib.controller.BatchOutHandler.run(BatchOutHandler.java:35) [bqstream.jar:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_141]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_141]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_141]

After looking at the code for InsertAll, it seems like some Preconditons call is performed on the row to be inserted. But why is the same performed on a data not provided in the Schema.

Activity

  1. added
    type: questionRequest for information or clarification. Not an issue.
    api: bigqueryIssues related to the BigQuery API.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Jul 3, 2018
  2. yihanzhen commented on Jul 3, 2018

    @yihanzhen
    Contributor

    Would you mind giving us a short repro snippet?

  3. surabhikannan commented on Jul 4, 2018

    @surabhikannan
    Author

    Here is the link to the snippet where the checkNotNull is performed. InsertAllRequest - checkNotNull

    any updates??

  4. surabhikannan commented on Jul 13, 2018

    @surabhikannan
    Author

    @hzyi-google is there any updates on the same.

  5. yihanzhen commented on Jul 13, 2018

    @yihanzhen
    Contributor

    Oh sorry about a typo in the former comment - I was asking if you could share a repro code?

  6. pongad commented on Jul 24, 2018

    @pongad
    Contributor

    @surabhikannan which version of BigQuery are you using? I believe this should have been fixed by #2798.

  7. surabhikannan commented on Jul 24, 2018

    @surabhikannan
    Author

    @pongad I am using v0.22.0, also thanks I was able to solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.priority: p2Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions