dtenedor commented on code in PR #40732:
URL: https://github.com/apache/spark/pull/40732#discussion_r1164774446
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveDefaultColumns.scala:
##########
@@ -569,25 +573,43 @@ case class ResolveDefaultColumns(catalog: SessionCatalog)
extends Rule[LogicalPl
// found" error. In the latter cases, return out of this rule without
changing anything and let
// the analyzer return a proper error message elsewhere.
val tableName: TableIdentifier = source match {
- case Some(r: UnresolvedRelation) => TableIdentifier(r.name)
- case Some(r: UnresolvedCatalogRelation) => r.tableMeta.identifier
- case _ => return None
+ case Some(r: UnresolvedRelation) =>
+ r.multipartIdentifier match {
Review Comment:
Sure, good idea. This is done. Now we can use the relation cache therein to
avoid looking up into the catalog twice, and also unify the logic to resolve
relations.
--
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]