dtenedor commented on code in PR #37280:
URL: https://github.com/apache/spark/pull/37280#discussion_r930174542


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveDefaultColumns.scala:
##########
@@ -153,8 +153,10 @@ case class ResolveDefaultColumns(catalog: SessionCatalog) 
extends Rule[LogicalPl
     val schemaForTargetTable: Option[StructType] = 
getSchemaForTargetTable(u.table)
     schemaForTargetTable.map { schema =>
       val defaultExpressions: Seq[Expression] = schema.fields.map {
-        case f if f.metadata.contains(CURRENT_DEFAULT_COLUMN_METADATA_KEY) => 
analyze(f, "UPDATE")
-        case _ => Literal(null)
+        case f if f.metadata.contains(CURRENT_DEFAULT_COLUMN_METADATA_KEY) =>
+          analyze(f, CURRENT_DEFAULT_COLUMN_METADATA_KEY, "UPDATE")
+        case _ =>
+          Literal(null)

Review Comment:
   No worries, done. Any code review comment is welcome :) I appreciate the 
effort it takes to review the new code.



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