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

fix: BQ Numeric is compatible with double and float protobuf types #367

Merged
merged 2 commits into from Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -206,6 +206,11 @@ private static boolean isCompatibleWithBQNumeric(Descriptors.FieldDescriptor.Typ
return true;
}

if (field == Descriptors.FieldDescriptor.Type.FLOAT
|| field == Descriptors.FieldDescriptor.Type.DOUBLE) {
return true;
}

return false;
}

Expand Down
Expand Up @@ -729,7 +729,9 @@ public void testBQNumeric() {
Fixed64Type.getDescriptor(),
SFixed32Type.getDescriptor(),
SFixed64Type.getDescriptor(),
BytesType.getDescriptor()));
BytesType.getDescriptor(),
FloatType.getDescriptor(),
DoubleType.getDescriptor()));

for (Descriptors.Descriptor descriptor : type_descriptors) {
if (compatible.contains(descriptor)) {
Expand Down