emkornfield commented on a change in pull request #8897:
URL: https://github.com/apache/arrow/pull/8897#discussion_r542593201
##########
File path: cpp/src/parquet/arrow/schema_internal.cc
##########
@@ -33,7 +33,10 @@ using ::arrow::internal::checked_cast;
Result<std::shared_ptr<ArrowType>> MakeArrowDecimal(const LogicalType&
logical_type) {
const auto& decimal = checked_cast<const DecimalLogicalType&>(logical_type);
- return ::arrow::Decimal128Type::Make(decimal.precision(), decimal.scale());
+ if (decimal.precision() <= ::arrow::Decimal128Type::kMaxPrecision) {
+ return ::arrow::Decimal128Type::Make(decimal.precision(), decimal.scale());
+ }
+ return ::arrow::Decimal256Type::Make(decimal.precision(), decimal.scale());
Review comment:
This is done in the
[Make](https://github.com/apache/arrow/blob/master/cpp/src/arrow/type.cc#L801)
functions (same as lower bound for Decimal128
----------------------------------------------------------------
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:
[email protected]