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 2020/06/03 19:06:55 UTC

[GitHub] [spark] brkyvz commented on a change in pull request #28717: [SPARK-29947][SQL][followup] ResolveRelations should return relations with fresh attribute IDs

brkyvz commented on a change in pull request #28717:
URL: https://github.com/apache/spark/pull/28717#discussion_r434790859



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -1024,7 +1024,12 @@ class Analyzer(
                 DataSourceV2Relation.create(table, Some(catalog), Some(ident)))
           }
           val key = catalog.name +: ident.namespace :+ ident.name
-          Option(AnalysisContext.get.relationCache.getOrElseUpdate(key, loaded.orNull))

Review comment:
       Why not just:
   ```
   Option(AnalysisContext.get.relationCache.getOrElseUpdate(key, loaded.orNull)).map { rel =>
     rel.transform { case multi: MultiInstanceRelation => multi.newInstance() }
   } 
   ```




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

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