alamb commented on code in PR #5863:
URL: https://github.com/apache/arrow-datafusion/pull/5863#discussion_r1158902408
##########
datafusion/physical-expr/src/sort_expr.rs:
##########
@@ -107,19 +147,94 @@ impl std::fmt::Display for PhysicalSortRequirement {
}
impl PhysicalSortRequirement {
+ /// Creates a new `exact` requirement, which must match the
+ /// required options and expression. See
+ /// [`PhysicalSortRequirement`] for examples.
+ pub fn new_exact(expr: Arc<dyn PhysicalExpr>, options: SortOptions) ->
Self {
+ Self {
+ expr,
+ options: Some(options),
+ }
+ }
+
+ /// Creates a new `expr_only` requirement, which must match the
+ /// required expression. See [`PhysicalSortRequirement`] for
+ /// examples.
+ pub fn new_expr_only(expr: Arc<dyn PhysicalExpr>) -> Self {
+ Self {
+ expr,
+ options: None,
+ }
+ }
Review Comment:
Changed in
[8a073c4](https://github.com/apache/arrow-datafusion/pull/5863/commits/8a073c4ae2252f30c91120cb5e9e3ff3fe540f91)
--
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]