You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/05/18 18:42:25 UTC
[GitHub] [spark] dtenedor commented on a diff in pull request #36475: [SPARK-38869][SQL] Respect table capability ACCEPT_ANY_SCHEMA in DEFAULT column resolution
dtenedor commented on code in PR #36475:
URL: https://github.com/apache/spark/pull/36475#discussion_r876230148
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveDefaultColumns.scala:
##########
@@ -522,6 +523,20 @@ case class ResolveDefaultColumns(
case _ => return None
}
val lookup: LogicalPlan = try {
+ // Check if the target table has "ACCEPT_ANY_SCHEMA" capabilities and if so,
+ // don't do anything.
+ analyzer.currentCatalog match {
Review Comment:
SG, done.
This match should be OK since it looks like in the [last PR](https://github.com/apache/spark/pull/36445) we updated the `resolveMergeExprOrFail` method in the `Analyzer` to exclude unresolved default references specifically so that it would let the `ResolveDefaultColumns` analyzer rule handle them (which should either replace them all or else return an error):
<img width="937" alt="image" src="https://user-images.githubusercontent.com/99207096/169120472-a8cb08d9-3e79-44b9-893c-709c39af5d4f.png">
--
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-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org