westonpace commented on code in PR #40817:
URL: https://github.com/apache/arrow/pull/40817#discussion_r1547786377


##########
cpp/src/arrow/acero/partition_util.h:
##########
@@ -62,7 +62,7 @@ class PartitionSort {
   template <class INPUT_PRTN_ID_FN, class OUTPUT_POS_FN>
   static void Eval(int64_t num_rows, int num_prtns, uint16_t* prtn_ranges,
                    INPUT_PRTN_ID_FN prtn_id_impl, OUTPUT_POS_FN 
output_pos_impl) {
-    ARROW_DCHECK(num_rows > 0 && num_rows <= (1 << 15));
+    ARROW_DCHECK(num_rows > 0 && num_rows <= ((1 << 16) - 1));

Review Comment:
   Also, `(1 << 16) - 1` is not the same number as `1 << 15`.  This change is 
loosening the check.  Are you confident this is correct?



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