Skip to content

Commit dd07329

Browse files
authored
Merge pull request #5 from chenkovsky/chenkovsky-patch-2
Chenkovsky patch 2
2 parents 6f46e73 + a12e8ca commit dd07329

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

datafusion/sql/src/select.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,8 @@ fn match_window_definitions(
860860
if let SelectItem::ExprWithAlias { expr, alias: _ }
861861
| SelectItem::UnnamedExpr(expr) = proj
862862
{
863-
let result = visit_expressions_mut(expr, |expr| {
863+
let mut err = None;
864+
visit_expressions_mut(expr, |expr| {
864865
if let SQLExpr::Function(f) = expr {
865866
if let Some(WindowType::NamedWindow(_)) = &f.over {
866867
for NamedWindowDefinition(window_ident, window_expr) in
@@ -881,18 +882,18 @@ fn match_window_definitions(
881882
}
882883
// All named windows must be defined with a WindowSpec.
883884
if let Some(WindowType::NamedWindow(ident)) = &f.over {
884-
return ControlFlow::Break(DataFusionError::Plan(format!(
885+
err = Some(DataFusionError::Plan(format!(
885886
"The window {ident} is not defined!"
886887
)));
888+
return ControlFlow::Break(());
887889
}
888890
}
889891
}
890892
ControlFlow::Continue(())
891893
});
892-
match result {
893-
ControlFlow::Continue(_) => (),
894-
ControlFlow::Break(err) => return Err(err),
895-
};
894+
if let Some(err) = err {
895+
return Err(err);
896+
}
896897
}
897898
}
898899
Ok(())

datafusion/sqllogictest/bin/sqllogictests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ const SQLITE_PREFIX: &str = "sqlite";
5353

5454
pub fn main() -> Result<()> {
5555
tokio::runtime::Builder::new_multi_thread()
56-
.thread_stack_size(4 * 1024 * 1024)
5756
.enable_all()
5857
.build()?
5958
.block_on(run_tests())

0 commit comments

Comments
 (0)