aokolnychyi commented on code in PR #50593: URL: https://github.com/apache/spark/pull/50593#discussion_r2056619992
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/ColumnDefinition.scala: ########## @@ -203,7 +206,9 @@ case class DefaultValueExpression(child: Expression, originalSQL: String) // Convert the default expression to ColumnDefaultValue, which is required by DS v2 APIs. def toV2(statement: String, colName: String): ColumnDefaultValue = child match { case Literal(value, dataType) => - new ColumnDefaultValue(originalSQL, LiteralValue(value, dataType)) + val currentDefault = analyzedChild.flatMap(new V2ExpressionBuilder(_).build()) Review Comment: @viirya, here is the difference between current and exists default. The current default is not necessarily a literal. It should be just a valid V2 expression. -- 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