viirya commented on a change in pull request #29756:
URL: https://github.com/apache/spark/pull/29756#discussion_r489195938



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -942,6 +957,47 @@ class Analyzer(
       }
   }
 
+  /**
+   * Replace [[UnresolvedRelation]] with concrete streaming logical plans.
+   */
+  object ResolveStreamingRelation extends Rule[LogicalPlan] {
+    override def apply(plan: LogicalPlan): LogicalPlan = 
plan.resolveOperatorsUp {
+      case u: UnresolvedRelation if u.isStreaming =>
+        val res = lookupStreamingRelation(u.multipartIdentifier, u.options)
+        res.getOrElse(u)
+    }
+
+    // Look up a relation from the session catalog with the following logic:
+    // 1) If the resolved catalog is not session catalog, return None.
+    // 2) If a relation is not found in the catalog, return None.
+    // 3) If a v1 table is found, create a v1 relation. Otherwise, pass the 
table to
+    //    UnresolvedStreamingRelation.

Review comment:
       hmm, I don't see `UnresolvedStreamingRelation`, is it missing?




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to