urosstan-db commented on code in PR #46594:
URL: https://github.com/apache/spark/pull/46594#discussion_r1624114358
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statements.scala:
##########
@@ -142,9 +143,16 @@ case class QualifiedColType(
def getV2Default: ColumnDefaultValue = {
default.map { sql =>
val e = ResolveDefaultColumns.analyze(colName, dataType, sql, "ALTER
TABLE")
- assert(e.resolved && e.foldable,
- "The existence default value must be a simple SQL string that is
resolved and foldable, " +
- "but got: " + sql)
+ if (!e.resolved || !e.foldable) {
Review Comment:
This method is invoked in planning phase from DataSourceV2Strategy, and this
was the first assertion on alter table path. I also modified second one (In
CatalogV2Util)
--
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]