Skip to content

Commit

Permalink
Fix re assemble the groups after each window function execution
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrDeveloper committed Dec 16, 2024
1 parent 7dc7ea2 commit fa423d8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/gitql-engine/src/engine_window_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ pub(crate) fn execute_window_functions_statement(
for argument in function.arguments.iter() {
let argument =
evaluate_expression(env, argument, &gitql_object.titles, &row.values)?;

row_selected_values.push(argument);
}

Expand All @@ -74,7 +73,6 @@ pub(crate) fn execute_window_functions_statement(
let aggregation_function =
env.aggregation_function(&function.function_name).unwrap();
let aggregated_value = aggregation_function(&frame_values);

for row in frame.rows.iter_mut() {
row.values[column_index] = aggregated_value.clone();
}
Expand All @@ -89,6 +87,7 @@ pub(crate) fn execute_window_functions_statement(
};
}
}
gitql_object.flat();
}

// Evaluate Expressions that depend on Window Functions evaluation
Expand All @@ -110,10 +109,9 @@ pub(crate) fn execute_window_functions_statement(
}
}
}
gitql_object.flat();
}

gitql_object.flat();

Ok(())
}

Expand Down

0 comments on commit fa423d8

Please sign in to comment.