-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Is your feature request related to a problem? Please describe.
An error occurs when the null value of bigquery set to the primitive type field of struct of go, and the following log appears.
google-cloud-go/bigquery/value.go
Line 111 in c4d1534
var errNoNulls = errors.New("bigquery: NULL values cannot be read into structs") |
this error log is abstract and it is difficult to debug.Especially when the number of fields in the struct is large, it takes time to find the offending field.
Describe the solution you'd like
Specifically output to the log which field name(or tag name) the error occurred in mapping.
For example, the following log.
NULL Value cannot assignable to struct field any_field_name of type int.
Describe alternatives you've considered
Add logs to the following parts of the module
google-cloud-go/bigquery/value.go
Line 430 in c4d1534
err = op.setFunc(field, values[op.valueIndex]) |
log.Printf("set value to %s", vstruct.Type().FieldByIndex(op.fieldIndex).Name)
err = op.setFunc(field, values[op.valueIndex])