Skip to content

Commit

Permalink
Support int64.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Oct 24, 2024
1 parent 53e5c83 commit 1b85ccb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clients/bigquery/converters/converters.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (s StringConverter) Convert(value any) (any, error) {
return castedValue, nil
case *decimal.Decimal:
return castedValue.String(), nil
case bool:
case bool, int64:
return fmt.Sprint(castedValue), nil
case *ext.ExtendedTime:
if err := s.kd.EnsureExtendedTimeDetails(); err != nil {
Expand All @@ -32,7 +32,7 @@ func (s StringConverter) Convert(value any) (any, error) {

return castedValue.GetTime().Format(s.kd.ExtendedTimeDetails.Format), nil
default:
return nil, fmt.Errorf("expected string/*decimal.Decimal/bool received %T with value %v", value, value)
return nil, fmt.Errorf("expected string/*decimal.Decimal/bool/int64 received %T with value %v", value, value)
}
}

Expand Down

0 comments on commit 1b85ccb

Please sign in to comment.