cloud-fan commented on a change in pull request #29756:
URL: https://github.com/apache/spark/pull/29756#discussion_r493462779
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -1020,16 +1039,35 @@ class Analyzer(
// 3) If a v1 table is found, create a v1 relation. Otherwise, create a v2
relation.
private def lookupRelation(
identifier: Seq[String],
- options: CaseInsensitiveStringMap): Option[LogicalPlan] = {
+ options: CaseInsensitiveStringMap,
+ isStreaming: Boolean): Option[LogicalPlan] = {
expandRelationName(identifier) match {
case SessionCatalogAndIdentifier(catalog, ident) =>
lazy val loaded = CatalogV2Util.loadTable(catalog, ident).map {
case v1Table: V1Table =>
- v1SessionCatalog.getRelation(v1Table.v1Table, options)
+ if (isStreaming) {
+ SubqueryAlias(
Review comment:
what happens for views? shall we fail here if `v1Table` is a view before
we have a good story?
----------------------------------------------------------------
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]