You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "alan910127 (via GitHub)" <gi...@apache.org> on 2025/02/04 05:18:53 UTC
Re: [I] Optimize SortPreservingMergeStream for single-column merge [datafusion]
alan910127 commented on issue #13642:
URL: https://github.com/apache/datafusion/issues/13642#issuecomment-2632903421
I've found that the sort isn't actually planned as a single-column sort. The `expressions` in this case contains multiple columns:
```rust
// SQL: row_number() over (partition by id6 order by v3 desc)
LexOrdering {
inner: [
PhysicalSortExpr {
expr: Column { name: "id6", index: 0 },
options: SortOptions { descending: false, nulls_first: false }
},
PhysicalSortExpr {
expr: Column { name: "v3", index: 1 },
options: SortOptions { descending: true, nulls_first: true }
}
]
}
```
I'm not sure whether this behavior is expected or if the plan should have used a single-column sort optimization in this case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org