bigquery-emulator icon indicating copy to clipboard operation
bigquery-emulator copied to clipboard

Table.getNumRows is null (numRows field not populated eventhough the table has rows)

Open erisa85 opened this issue 1 year ago • 1 comments

I have created a table with the emulator and inserted a row in there. I have implemented this method to get the rowCount for the table as it is more performant compared to running an SQL select count(*) query:

public long countRows(Table table) { return table.getNumRows().longValue(); }

However the above method throws a null pointer exception because numRows field is null for the com.google.cloud.bigquery.Table eventhough the table has rows.

It would be nice to fix this issue in the emulator.

erisa85 avatar Nov 23 '23 15:11 erisa85

Thank you for reporting this issue. Could you please provide detailed steps on how to reproduce it? Thank you.

totem3 avatar Dec 07 '23 01:12 totem3