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

Data: Update FieldTypeFor to support nullable fields #633

Merged
merged 1 commit into from
Feb 28, 2023
Merged

Conversation

kylebrandt
Copy link
Contributor

slighly a breaking change since a comment said concrete, but in that case it would return FieldTypeUnknown which would generally panic somewhere else

slighly a breaking change since a comment said concrete, but in that case it would
return FieldTypeUnknown which would generally panic somewhere else
@kylebrandt kylebrandt requested a review from a team as a code owner February 27, 2023 19:06
default:
panic(fmt.Sprintf("unsupported vector ptype: %+v", p))
}
}

// NonNullableType converts the FieldType to the corresponding not-nullable type.
// Calling this on FieldTypeUnknown will panic.
Copy link
Member

Choose a reason for hiding this comment

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

should we panic? or return unknown?

Copy link
Member

Choose a reason for hiding this comment

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

as long as the panic will always be triggerd in development... panic is OK 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that will just push the panic to later calls, like NewFieldFromType

@kylebrandt kylebrandt merged commit 375444b into main Feb 28, 2023
@kylebrandt kylebrandt deleted the fieldTypeFor branch February 28, 2023 13:12
@kylebrandt kylebrandt added the area/dataplane Dataplane Project (Data type contract) label Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dataplane Dataplane Project (Data type contract)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants