mustafasrepo commented on code in PR #4691:
URL: https://github.com/apache/arrow-datafusion/pull/4691#discussion_r1056146597
##########
datafusion/core/src/physical_plan/windows/window_agg_exec.rs:
##########
@@ -131,6 +135,27 @@ impl WindowAggExec {
pub fn input_schema(&self) -> SchemaRef {
self.input_schema.clone()
}
+
+ /// Get partition keys
+ pub fn partition_by_sort_keys(&self) -> Result<Vec<PhysicalSortExpr>> {
+ let mut result = vec![];
+ // All window exprs have the same partition by, so we just use the
first one:
+ let partition_by = self.window_expr()[0].partition_by();
Review Comment:
`self.partition_keys` stores the keys used during repartitioning. Hence when
repartitioning is available they are indeed equivalent, however when it is
disabled `self.partition_keys` is empty. It can be seen
[here](https://github.com/apache/arrow-datafusion/blob/afb1ae230d53db3cd6c26230040c277d9c2945f8/datafusion/core/src/physical_plan/planner.rs#L533)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]