You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2023/09/20 20:29:26 UTC
[GitHub] [arrow-datafusion] Dandandan commented on a diff in pull request #7609: Fix panic in TopK
Dandandan commented on code in PR #7609:
URL: https://github.com/apache/arrow-datafusion/pull/7609#discussion_r1332139622
##########
datafusion/core/src/physical_optimizer/topk_aggregation.rs:
##########
@@ -51,7 +52,7 @@ impl TopKAggregation {
if desc != order.options.descending {
return None;
}
- let group_key = aggr.group_expr().expr().first()?;
+ let group_key = aggr.group_expr().expr().iter().exactly_one().ok()?;
Review Comment:
😎😎😎
##########
datafusion/core/src/physical_optimizer/topk_aggregation.rs:
##########
@@ -51,7 +52,7 @@ impl TopKAggregation {
if desc != order.options.descending {
return None;
}
- let group_key = aggr.group_expr().expr().first()?;
+ let group_key = aggr.group_expr().expr().iter().exactly_one().ok()?;
Review Comment:
😎😎😎
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org