Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
huaxingao committed Sep 23, 2024
1 parent 78f18f6 commit f801106
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions native/core/src/execution/datafusion/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1700,9 +1700,8 @@ impl PhysicalPlanner {
WindowFrameBound::Preceding(ScalarValue::Int64(None))
}
WindowFrameUnits::Groups => {
return Err(ExecutionError::GeneralError(format!(
"WindowFrameUnits::Groups is not supported."
)))
return Err(ExecutionError::GeneralError(
"WindowFrameUnits::Groups is not supported.".to_string()));
}
},
LowerFrameBoundStruct::Preceding(offset) => {
Expand All @@ -1713,11 +1712,10 @@ impl PhysicalPlanner {
)),
WindowFrameUnits::Range => {
WindowFrameBound::Preceding(ScalarValue::Int64(Some(offset_value)))
},
}
WindowFrameUnits::Groups => {
return Err(ExecutionError::GeneralError(format!(
"WindowFrameUnits::Groups is not supported."
)))
return Err(ExecutionError::GeneralError(
"WindowFrameUnits::Groups is not supported.".to_string()));
}
}
}
Expand All @@ -1726,10 +1724,10 @@ impl PhysicalPlanner {
None => match units {
WindowFrameUnits::Rows => WindowFrameBound::Preceding(ScalarValue::UInt64(None)),
WindowFrameUnits::Range => WindowFrameBound::Preceding(ScalarValue::Int64(None)),
WindowFrameUnits::Groups =>
return Err(ExecutionError::GeneralError(format!(
"WindowFrameUnits::Groups is not supported."
)))
WindowFrameUnits::Groups => {
return Err(ExecutionError::GeneralError(
"WindowFrameUnits::Groups is not supported.".to_string()));
}
},
};

Expand All @@ -1747,9 +1745,8 @@ impl PhysicalPlanner {
WindowFrameBound::Following(ScalarValue::Int64(None))
}
WindowFrameUnits::Groups => {
return Err(ExecutionError::GeneralError(format!(
"WindowFrameUnits::Groups is not supported."
)))
return Err(ExecutionError::GeneralError(
"WindowFrameUnits::Groups is not supported.".to_string()));
}
},
UpperFrameBoundStruct::Following(offset) => match units {
Expand All @@ -1760,20 +1757,19 @@ impl PhysicalPlanner {
WindowFrameBound::Following(ScalarValue::Int64(Some(offset.offset)))
}
WindowFrameUnits::Groups => {
return Err(ExecutionError::GeneralError(format!(
"WindowFrameUnits::Groups is not supported."
)))
return Err(ExecutionError::GeneralError(
"WindowFrameUnits::Groups is not supported.".to_string()));
}
},
UpperFrameBoundStruct::CurrentRow(_) => WindowFrameBound::CurrentRow,
},
None => match units {
WindowFrameUnits::Rows => WindowFrameBound::Following(ScalarValue::UInt64(None)),
WindowFrameUnits::Range => WindowFrameBound::Following(ScalarValue::Int64(None)),
WindowFrameUnits::Groups =>
return Err(ExecutionError::GeneralError(format!(
"WindowFrameUnits::Groups is not supported."
)))
WindowFrameUnits::Groups => {
return Err(ExecutionError::GeneralError(
"WindowFrameUnits::Groups is not supported.".to_string()));
}
},
};

Expand Down

0 comments on commit f801106

Please sign in to comment.