shivadarshan-devadiga commented on code in PR #60756:
URL: https://github.com/apache/spark/pull/60756#discussion_r4651836835
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala:
##########
@@ -712,7 +712,8 @@ case class Union(
!(byName || allowMissingCol) &&
childrenResolved &&
allChildrenCompatible &&
- (!conf.unionIsResolvedWhenDuplicatesPerChildResolved ||
duplicatesResolvedPerBranch)
+ (!conf.unionIsResolvedWhenDuplicatesPerChildResolved ||
duplicatesResolvedPerBranch) &&
+ SetOperationCharPadding.isAligned(children)
Review Comment:
Fixed. `WidenSetOperationTypes` now checks `resolvedExceptCharLengths`
instead of `resolved`, so a CHAR mismatch alone doesn't make it cast, as before
this PR. Your `STRUCT<c: CHAR(3) NOT NULL>` and `STRUCT<c: CHAR(5)>` union is
in the union test: it is padded, not cast, and its output is `STRUCT<c:
CHAR(5)>` with 'a '.
--
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]