ZhangHuiGui commented on code in PR #41234:
URL: https://github.com/apache/arrow/pull/41234#discussion_r1614382492
##########
cpp/src/arrow/compute/row/row_internal.cc:
##########
@@ -111,9 +112,16 @@ void RowTableMetadata::FromColumnMetadataVector(
}
return left < right;
});
+ are_cols_sorted = false;
inverse_column_order.resize(num_cols);
for (uint32_t i = 0; i < num_cols; ++i) {
inverse_column_order[column_order[i]] = i;
+ // Check whether the column_order has changed due to sorting,
+ // and the sorted column order will be used first for better
+ // performance in grouper's compare.
+ if (inverse_column_order[i] != column_order[i]) {
Review Comment:
When constructing `RowTableMetadata`, whether 'the column order after sort
changes' will be used as a mark to access column data using sorted-mode or
non-sorted mode.
--
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]