shivadarshan-devadiga commented on code in PR #60756:
URL: https://github.com/apache/spark/pull/60756#discussion_r4652231805


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala:
##########
@@ -49,6 +49,7 @@ object TypeCoercion extends TypeCoercionBase {
   override def typeCoercionRules: List[Rule[LogicalPlan]] =
     UnpivotCoercion ::
     WidenSetOperationTypes ::
+    PadSetOperationCharLengths ::

Review Comment:
   Fixed. The rule is no longer in `TypeCoercion.typeCoercionRules` and 
`AnsiTypeCoercion.typeCoercionRules`, which 
`DistributionAndOrderingUtils.prepareQuery` reuses. It's in the Resolution 
batch right after them, before `ResolveWithCTE`. The metadata your scenario 
relied on can't diverge any more either: 
`PushProjectionThroughUnion.pushToRight` now builds the alias of the other 
children with the explicit metadata of the first child's (`Alias(child, 
alias)(explicitMetadata = a.explicitMetadata, ...)`), so all children of the 
pushed-down union have the same CHAR types.



-- 
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]

Reply via email to