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 92b5c58
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 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,9 @@ 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 +1713,11 @@ 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 +1726,11 @@ 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 +1748,9 @@ 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 +1761,21 @@ 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 92b5c58

Please sign in to comment.