Skip to content

Commit

Permalink
fix: CometTakeOrderedAndProjectExec native scan node should use child…
Browse files Browse the repository at this point in the history
… operator's output (#896)
  • Loading branch information
viirya authored Aug 30, 2024
1 parent e57ead4 commit bfbb0be
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ case class CometTakeOrderedAndProjectExec(
childRDD
} else {
val localTopK = if (orderingSatisfies) {
CometExecUtils.getNativeLimitRDD(childRDD, output, limit)
CometExecUtils.getNativeLimitRDD(childRDD, child.output, limit)
} else {
childRDD.mapPartitionsInternal { iter =>
val topK =
CometExecUtils
.getTopKNativePlan(output, sortOrder, child, limit)
.getTopKNativePlan(child.output, sortOrder, child, limit)
.get
CometExec.getCometIterator(Seq(iter), topK)
}
Expand All @@ -100,7 +100,7 @@ case class CometTakeOrderedAndProjectExec(

singlePartitionRDD.mapPartitionsInternal { iter =>
val topKAndProjection = CometExecUtils
.getProjectionNativePlan(projectList, output, sortOrder, child, limit)
.getProjectionNativePlan(projectList, child.output, sortOrder, child, limit)
.get
val it = CometExec.getCometIterator(Seq(iter), topKAndProjection)
setSubqueries(it.id, this)
Expand Down

0 comments on commit bfbb0be

Please sign in to comment.