westonpace commented on code in PR #34651:
URL: https://github.com/apache/arrow/pull/34651#discussion_r1194256801
##########
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:
Hmm, technically unspecified would be an invalid plan I think. So it would
probably be better to reject.
--
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]