wangyum commented on a change in pull request #29475:
URL: https://github.com/apache/spark/pull/29475#discussion_r473810179
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/subquery.scala
##########
@@ -131,14 +131,15 @@ case class InSubqueryExec(
def updateResult(): Unit = {
val rows = plan.executeCollect()
- result = child.dataType match {
- case _: StructType => rows.toArray
- case _ => rows.map(_.get(0, child.dataType))
- }
+ // The child is always partition column. So it must be AtomicType.
Review comment:
`InSubqueryExec` is for Dynamic Partition Pruning only:
https://github.com/apache/spark/blob/68034a805607ced50dbedca73dfc7eaf0102dde8/sql/core/src/main/scala/org/apache/spark/sql/execution/subquery.scala#L109-L117
`PlanSubqueries` actually has one element. It is from
[PlanDynamicPruningFilters.scala#L88-L89](https://github.com/apache/spark/blob/68034a805607ced50dbedca73dfc7eaf0102dde8/sql/core/src/main/scala/org/apache/spark/sql/dynamicpruning/PlanDynamicPruningFilters.scala#L88-L89).
I'm thinking could we move
[subquery.scala#L185-L196](https://github.com/apache/spark/blob/68034a805607ced50dbedca73dfc7eaf0102dde8/sql/core/src/main/scala/org/apache/spark/sql/execution/subquery.scala#L185-L196)
to
[PlanDynamicPruningFilters.scala#L88-L89](https://github.com/apache/spark/blob/68034a805607ced50dbedca73dfc7eaf0102dde8/sql/core/src/main/scala/org/apache/spark/sql/dynamicpruning/PlanDynamicPruningFilters.scala#L88-L89)
to make logic more clear.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]