mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-24 17:00:37 +00:00
perf: no longer window sort when limit (#7912)
* perf: no longer window sort when limit Signed-off-by: discord9 <discord9@163.com> * test: confusing vector sqlness Signed-off-by: discord9 <discord9@163.com> * chore: redact sqlness Signed-off-by: discord9 <discord9@163.com> * chore: redact every thing Signed-off-by: discord9 <discord9@163.com> * REDACTED Signed-off-by: discord9 <discord9@163.com> * what Signed-off-by: discord9 <discord9@163.com> --------- Signed-off-by: discord9 <discord9@163.com>
This commit is contained in:
@@ -94,6 +94,8 @@ impl WindowedSortPhysicalRule {
|
||||
&& scanner_info
|
||||
.time_index
|
||||
.contains(input_schema.field(column_expr.index()).name())
|
||||
&& sort_exec.fetch().is_none()
|
||||
// skip if there is a limit, as dyn filter along is good enough in this case
|
||||
{
|
||||
} else {
|
||||
return Ok(Transformed::no(plan));
|
||||
|
||||
@@ -237,14 +237,10 @@ impl ExecutionPlan for PartSortExec {
|
||||
} else {
|
||||
internal_err!("No children found")?
|
||||
};
|
||||
// create a new dynamic filter when with_new_children, as the old filter is bound to the old input and cannot be reused
|
||||
let new = Self::try_new(
|
||||
self.expression.clone(),
|
||||
self.limit,
|
||||
self.partition_ranges.clone(),
|
||||
new_input.clone(),
|
||||
)?;
|
||||
Ok(Arc::new(new))
|
||||
let mut new_exec = self.as_ref().clone();
|
||||
new_exec.input = new_input.clone();
|
||||
new_exec.properties = new_input.properties().clone();
|
||||
Ok(Arc::new(new_exec))
|
||||
}
|
||||
|
||||
fn execute(
|
||||
|
||||
Reference in New Issue
Block a user