kosiew commented on code in PR #18753:
URL: https://github.com/apache/datafusion/pull/18753#discussion_r2532443323


##########
datafusion/substrait/src/logical_plan/consumer/expr/window_function.rs:
##########
@@ -66,22 +63,8 @@ pub async fn from_window_function(
     let mut order_by =
         from_substrait_sorts(consumer, &window.sorts, input_schema).await?;
 
-    let bound_units = match 
BoundsType::try_from(window.bounds_type).map_err(|e| {
-        plan_datafusion_err!("Invalid bound type {}: {e}", window.bounds_type)
-    })? {
-        BoundsType::Rows => WindowFrameUnits::Rows,
-        BoundsType::Range => WindowFrameUnits::Range,
-        BoundsType::Unspecified => {
-            // If the plan does not specify the bounds type, then we use a 
simple logic to determine the units
-            // If there is no `ORDER BY`, then by default, the frame counts 
each row from the lower up to upper boundary
-            // If there is `ORDER BY`, then by default, each frame is a range 
starting from unbounded preceding to current row
-            if order_by.is_empty() {
-                WindowFrameUnits::Rows
-            } else {
-                WindowFrameUnits::Range
-            }

Review Comment:
   This is moved to
   datafusion/substrait/src/logical_plan/bounds_type.rs



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to