You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "ozankabak (via GitHub)" <gi...@apache.org> on 2023/02/16 21:20:27 UTC

[GitHub] [arrow-datafusion] ozankabak commented on a diff in pull request #5286: Linear search support for Window Group queries

ozankabak commented on code in PR #5286:
URL: https://github.com/apache/arrow-datafusion/pull/5286#discussion_r1109034121


##########
datafusion/proto/src/logical_plan/from_proto.rs:
##########
@@ -907,16 +908,13 @@ pub fn parse_expr(
                 .window_frame
                 .as_ref()
                 .map::<Result<WindowFrame, _>, _>(|window_frame| {
-                    let window_frame: WindowFrame = window_frame.clone().try_into()?;
-                    if WindowFrameUnits::Range == window_frame.units
-                        && order_by.len() != 1
-                    {
-                        Err(proto_error("With window frame of type RANGE, the order by expression must be of length 1"))
-                    } else {
-                        Ok(window_frame)
-                    }
+                    let window_frame = window_frame.clone().try_into()?;
+                    regularize(window_frame, order_by.len())

Review Comment:
   Agreed. That logic was already here from before, in this PR we just refactored it out into the `regularize` function so that we will be able to remove it easily later on.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org