Skip to content

Commit

Permalink
fix: nil load statistics for bigquery (#4328)
Browse files Browse the repository at this point in the history
  • Loading branch information
achettyiitr committed Jan 18, 2024
1 parent 1b468f4 commit 48cd75c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions warehouse/integrations/bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,15 +439,18 @@ func (bq *BigQuery) loadTableByAppend(

log.Infow("completed loading")

tableStats := &types.LoadTableStats{
RowsInserted: statistics.Load.OutputRows,
tableStats := &types.LoadTableStats{}
if statistics.Load != nil {
tableStats.RowsInserted = statistics.Load.OutputRows
}
response := &loadTableResponse{
partitionDate: partitionDate,
}
return tableStats, response, nil
}

// jobStatistics returns statistics for a job
// In case of rate limit error, it returns empty statistics
func (bq *BigQuery) jobStatistics(
ctx context.Context,
job *bigquery.Job,
Expand Down

0 comments on commit 48cd75c

Please sign in to comment.