Skip to content

Commit

Permalink
simpler version of fix for output-only fields (e.g. numBytes)
Browse files Browse the repository at this point in the history
  • Loading branch information
myhau committed Jul 15, 2024
1 parent 48951ec commit c64a4ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2580,6 +2580,10 @@ func createTableMetadata(ctx context.Context, tx *connection.Tx, server *Server,
table.CreationTime = now
table.LastModifiedTime = uint64(now)
table.Type = string(DefaultTableType) // TODO: need to handle other table types

// TODO: set these later
table.NumBytes = 0
table.NumRows = 0
if table.View != nil {
table.Type = string(ViewTableType)
}
Expand Down
1 change: 1 addition & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func (t *Table) ToBigqueryV2(projectID, datasetID string) *bigqueryv2.Table {
Fields: fields,
},
NumRows: uint64(len(t.Data)),
NumBytes: int64(len(t.Data)), // FIXME: placeholder
CreationTime: now,
LastModifiedTime: uint64(now),
}
Expand Down

0 comments on commit c64a4ac

Please sign in to comment.