Skip to content

Commit

Permalink
Support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Oct 24, 2024
1 parent 784cbf0 commit 0b164f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clients/bigquery/storagewrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ func rowToMessage(row map[string]any, columns []columns.Column, messageDescripto
case ext.DateKindType:
daysSinceEpoch := _time.Unix() / (60 * 60 * 24)
message.Set(field, protoreflect.ValueOfInt32(int32(daysSinceEpoch)))
case ext.TimestampTZKindType:
if err := timestamppb.New(_time).CheckValid(); err != nil {
case ext.TimestampTZKindType, ext.TimestampNTZKindType:
if err = timestamppb.New(_time).CheckValid(); err != nil {
return nil, err
}
message.Set(field, protoreflect.ValueOfInt64(_time.UnixMicro()))
Expand Down

0 comments on commit 0b164f9

Please sign in to comment.