stefankandic commented on code in PR #50053:
URL: https://github.com/apache/spark/pull/50053#discussion_r1971895942


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveDDLCommandStringTypes.scala:
##########
@@ -121,6 +124,29 @@ object ResolveDDLCommandStringTypes extends 
Rule[LogicalPlan] {
       newType => Literal(value, replaceDefaultStringType(dt, newType))
   }
 
+  /**
+   * Casts [[DefaultStringProducingExpression]] in the plan to the `newType`.
+   */
+  private def castDefaultStringExpressions(plan: LogicalPlan, newType: 
StringType): LogicalPlan = {
+    if (newType == StringType) return plan
+
+    plan.mapChildren { operator =>
+      operator.mapExpressions { expression =>
+        expression.mapChildren {

Review Comment:
   Yeah, you are right, sorry I missed this. Changed the behavior to visit 
recursively and added new test to verify this behavior.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to