SavicStefan commented on code in PR #59134:
URL: https://github.com/apache/spark/pull/59134#discussion_r4165957225
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala:
##########
@@ -2890,8 +2892,10 @@ object AsOfJoin {
(leftOperand.dataType, rightOperand.dataType) match {
case (leftStruct: StructType, rightStruct: StructType)
if MatchConditionTypes.usesIdenticalStructSort(leftStruct,
rightStruct) =>
- if (isSqlTupleStructOperand(leftOperand) ||
isSqlTupleStructOperand(rightOperand)) {
- val pairs = collectStructLeafPairs(leftOperand, rightOperand,
leftStruct)
+ if ((isSqlTupleStructOperand(leftOperand) ||
isSqlTupleStructOperand(rightOperand)) &&
+ !leftOperand.nullable && !rightOperand.nullable) {
Review Comment:
we gain simpler logic, because we are choosing sort keys independently for
each side, splitting tuples where safe and keeping STRUCT columns whole and we
since equal key counts isn't required we could remove that restriction
--
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]