gengliangwang commented on code in PR #45904:
URL: https://github.com/apache/spark/pull/45904#discussion_r1556422516


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/ResolveDefaultColumnsUtil.scala:
##########
@@ -321,8 +322,11 @@ object ResolveDefaultColumns extends QueryErrorsBase
           Option(casted.eval(EmptyRow)).map(Literal(_, targetType))
         } catch {
           case e @ ( _: SparkThrowable | _: RuntimeException) =>
-            logWarning(s"Failed to cast default value '$l' for column $colName 
from " +
-              s"${l.dataType} to $targetType due to ${e.getMessage}")
+            logWarning(log"Failed to cast default value 
'${MDC(COLUMN_DEFAULT_VALUE, l)}' " +
+              log"for column ${MDC(COLUMN_NAME, colName)} " +
+              log"from ${MDC(COLUMN_DATA_TYPE, l.dataType)} " +

Review Comment:
   we can't use COLUMN_DATA_TYPE for two variables here.



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