wjones127 commented on code in PR #15244:
URL: https://github.com/apache/arrow/pull/15244#discussion_r1066532813


##########
cpp/src/parquet/arrow/schema.cc:
##########
@@ -354,11 +354,15 @@ Status FieldToNode(const std::string& name, const 
std::shared_ptr<Field>& field,
     } break;
     case ArrowTypeId::DECIMAL128:
     case ArrowTypeId::DECIMAL256: {
-      type = ParquetType::FIXED_LEN_BYTE_ARRAY;
       const auto& decimal_type = static_cast<const 
::arrow::DecimalType&>(*field->type());
       precision = decimal_type.precision();
       scale = decimal_type.scale();
-      length = DecimalType::DecimalSize(precision);
+      if (properties.integer_annotate_decimal() && 1 <= precision && precision 
<= 18) {

Review Comment:
   Not sure what you mean by that. This PR is how the data is encoded in the 
buffers, not what logical type is saved in the Parquet file. When read back to 
Arrow it will always come out as a Decimal, so there's no need for conversion.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to