Skip to content

Commit

Permalink
Rename to int64.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Aug 27, 2024
1 parent 044e97f commit 99a0f9c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions clients/bigquery/converters/converters.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ func (StringConverter) Convert(value any) (any, error) {
}
}

type IntegerConverter struct{}
type Int64Converter struct{}

func (IntegerConverter) Convert(value any) (any, error) {
func (Int64Converter) Convert(value any) (any, error) {
switch castedValue := value.(type) {
case int:
return int64(castedValue), nil
Expand Down
4 changes: 2 additions & 2 deletions clients/bigquery/converters/converters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func TestStringConverter_Convert(t *testing.T) {
}
}

func TestIntegerConverter_Convert(t *testing.T) {
converter := IntegerConverter{}
func TestInt64Converter_Convert(t *testing.T) {
converter := Int64Converter{}
{
// int
val, err := converter.Convert(123)
Expand Down
2 changes: 1 addition & 1 deletion clients/bigquery/storagewrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func rowToMessage(row map[string]any, columns []columns.Column, messageDescripto

message.Set(field, protoreflect.ValueOfBool(castedVal))
case typing.Integer.Kind:
val, err := converters.IntegerConverter{}.Convert(value)
val, err := converters.Int64Converter{}.Convert(value)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 99a0f9c

Please sign in to comment.