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


##########
cpp/src/arrow/engine/substrait/relation_internal.cc:
##########
@@ -367,6 +367,23 @@ ARROW_ENGINE_EXPORT Result<DeclarationInfo> 
MakeAggregateDeclaration(
 
 }  // namespace internal
 
+namespace {
+
+bool IsSortNullsFirst(const substrait::SortField::SortDirection& direction) {
+  return direction % 2 == 1;
+}
+
+compute::SortOrder SortOrderFromDirection(
+    const substrait::SortField::SortDirection& direction) {
+  if (direction < 3) {
+    return compute::SortOrder::Ascending;

Review Comment:
   This is now an explicit rejection.
   
   ```
         case substrait::SortField::SortDirection::
             SortField_SortDirection_SORT_DIRECTION_UNSPECIFIED:
           return Status::Invalid("The substrait plan does not specify a sort 
direction");
   ```



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