aokolnychyi commented on code in PR #56606:
URL: https://github.com/apache/spark/pull/56606#discussion_r3456139828
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -1203,16 +1205,14 @@ class Analyzer(
throw
QueryCompilationErrors.missingCatalogViewsAbilityError(catalog)
}
catalog match {
- case mc: TableViewCatalog =>
- // Single-RPC perf path: loadTableOrView returns a Table for a
table or a
- // MetadataTable wrapping a ViewInfo for a view. NoSuchTable
means
- // neither exists.
+ case mc: RelationCatalog =>
+ // Single-RPC perf path: loadRelation returns a Table for a
table or a View
+ // for a view. NoSuchTable means neither exists.
try {
- Some(mc.loadTableOrView(ident) match {
- case t: MetadataTable if
t.getTableInfo.isInstanceOf[ViewInfo] =>
- ResolvedPersistentView(
- catalog, ident, t.getTableInfo.asInstanceOf[ViewInfo])
- case table =>
+ Some(mc.loadRelation(ident) match {
Review Comment:
Minor: This may throw a harder to read error if we get some weird Relation
that's not a table or view.
--
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]