cloud-fan commented on code in PR #44988:
URL: https://github.com/apache/spark/pull/44988#discussion_r1475432376
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/DynamicPruning.scala:
##########
@@ -67,10 +67,12 @@ case class DynamicPruningSubquery(
buildQuery.resolved &&
buildKeys.nonEmpty &&
buildKeys.forall(_.resolved) &&
- broadcastKeyIndex >= 0 &&
- broadcastKeyIndex < buildKeys.size &&
+ broadcastKeyIndices.forall(idx => idx >= 0 && idx < buildKeys.size) &&
buildKeys.forall(_.references.subsetOf(buildQuery.outputSet)) &&
- pruningKey.dataType == buildKeys(broadcastKeyIndex).dataType
+ // DynamicPruningSubquery should only have a single broadcasting key
since
+ // there are no usage for multiple broadcasting keys at the moment.
+ broadcastKeyIndices.size == 1 &&
+ child.dataType == buildKeys(broadcastKeyIndices.head).dataType
Review Comment:
although `def child: Expression = pruningKey`, shall we still keep
`pruningKey.dataType` as before?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]