wesm commented on a change in pull request #7568:
URL: https://github.com/apache/arrow/pull/7568#discussion_r446993778



##########
File path: cpp/src/arrow/ipc/metadata_internal.cc
##########
@@ -257,6 +259,9 @@ Status ConcreteTypeFromFlatbuffer(flatbuf::Type type, const 
void* type_data,
       return Status::OK();
     case flatbuf::Type::Decimal: {
       auto dec_type = static_cast<const flatbuf::Decimal*>(type_data);
+      if (dec_type->bitWidth() != kDecimalBitWidth) {
+        return Status::Invalid("Library only supports 128-bit decimal values");

Review comment:
       The Flatbuffers library takes care of this -- `bitWidth()` always 
returns a value and if the serialized field is not present, the default 128 is 
returned. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to