pitrou commented on code in PR #44184: URL: https://github.com/apache/arrow/pull/44184#discussion_r2180376421
########## docs/source/cpp/compute.rst: ########## @@ -294,8 +295,10 @@ the input to a single output value. the values to be pivoted. The output is a Struct with one field for each key in :member:`PivotOptions::key_names`. -* \(9) Output is Int64, UInt64, Float64, or Decimal128/256, depending on the - input type. +* \(9) Output is Int64, UInt64, Float64, or Decimal128/256, depending + on the input type. For sums of decimals, the precision is increased to the maximum + precision for the type's width. For instance, an array of + ``decimal128(3, 2)`` will return a ``decimal128(38, 2)`` scalar. Review Comment: Is the example wrong or is it just misleading? The previous sentence mentions that the sum will expand the precision to the max. ########## docs/source/cpp/compute.rst: ########## @@ -294,8 +295,10 @@ the input to a single output value. the values to be pivoted. The output is a Struct with one field for each key in :member:`PivotOptions::key_names`. -* \(9) Output is Int64, UInt64, Float64, or Decimal128/256, depending on the - input type. +* \(9) Output is Int64, UInt64, Float64, or Decimal128/256, depending + on the input type. For sums of decimals, the precision is increased to the maximum + precision for the type's width. For instance, an array of + ``decimal128(3, 2)`` will return a ``decimal128(38, 2)`` scalar. Review Comment: Is the example wrong or is it just confusing? The previous sentence mentions that the sum will expand the precision to the max. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org