Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes FieldTypeFor for nullable float values #635

Merged
merged 3 commits into from
Mar 1, 2023
Merged

Conversation

yesoreyeram
Copy link
Contributor

@yesoreyeram yesoreyeram commented Mar 1, 2023

fixes a bug in field type computation for nullable float values and also adds tests for FieldTypeFor method. ( introduced in #633 )

note: currently we are returning unknown type for int values. ( unsure if we want to convert into int64 field )

{item: 123, want: data.FieldTypeUnknown},
{item: pointer(123), want: data.FieldTypeUnknown},

@yesoreyeram yesoreyeram requested a review from a team as a code owner March 1, 2023 11:10
data/field_type_test.go Outdated Show resolved Hide resolved
@@ -164,12 +164,12 @@ func FieldTypeFor(item interface{}) FieldType {
case float32:
return FieldTypeFloat32
case *float32:
return FieldTypeFloat32
return FieldTypeNullableFloat32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

@yesoreyeram yesoreyeram merged commit 9a83358 into main Mar 1, 2023
@yesoreyeram yesoreyeram deleted the fix-fieldtypefor branch March 1, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants