You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Page<Table> tables = bigquery.listTables(datasetId, BigQuery.TableListOption.pageSize(1));
Iterable<Table> table_iterator = tables.iterateAll();
for (Tabletable : table_iterator){
if (table.getDefinition().getType().toString().equalsIgnoreCase("TABLE")) {
System.out.println("table");
}
}
Stack trace
Caused by: java.lang.NullPointerException: Null pointer - Got unexpected time partitioning {"field":"XXXXX"} in project XXXXXX in dataset XXXXX in table XXXXX java.lang.NullPointerException: Name is null
at com.google.cloud.bigquery.StandardTableDefinition.fromPb(StandardTableDefinition.java:298)
at com.google.cloud.bigquery.TableDefinition.fromPb(TableDefinition.java:151)
at com.google.cloud.bigquery.TableInfo$BuilderImpl.<init>(TableInfo.java:188)
at com.google.cloud.bigquery.Table.fromPb(Table.java:624)
at com.google.cloud.bigquery.BigQueryImpl$21.apply(BigQueryImpl.java:847)
at com.google.cloud.bigquery.BigQueryImpl$21.apply(BigQueryImpl.java:844)
at com.google.common.collect.Iterators$6.transform(Iterators.java:786)
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47)
at com.google.cloud.PageImpl$PageIterator.computeNext(PageImpl.java:72)
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136)
Any additional information below
This issue occurs on a few tables in Prod which I am not able to replicate in Dev.
The rpc call has the partition type as null but the TimePartitioning object in the response pb is not null which is leading to an NPE at this point.
Environment details
General, Core, and Other are also allowed as types
com.google.cloud
google-cloud-bigquery
1.110.0
Steps to reproduce
NOT ABLE TO REPRODUCE
Code example
Stack trace
Any additional information below
This issue occurs on a few tables in Prod which I am not able to replicate in Dev.
The rpc call has the partition type as null but the TimePartitioning object in the response pb is not null which is leading to an NPE at this point.
java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java
Line 276 in b539f95