case class AnalysisContext(catalogAndNamespace: Seq[String] = Nil, nestedViewDepth: Int = 0, maxNestedViewDepth: Int = -1, relationCache: Map[(Seq[String], Option[TimeTravelSpec]), LogicalPlan] = mutable.Map.empty, referredTempViewNames: Seq[Seq[String]] = Seq.empty, referredTempFunctionNames: Set[String] = mutable.Set.empty, outerPlan: Option[LogicalPlan] = None) extends Product with Serializable
Provides a way to keep state during the analysis, mostly for resolving views and subqueries. This enables us to decouple the concerns of analysis environment from the catalog and resolve star expressions in subqueries that reference the outer query plans. The state that is kept here is per-query.
Note this is thread local.
- catalogAndNamespace
The catalog and namespace used in the view resolution. This overrides the current catalog and namespace when resolving relations inside views.
- nestedViewDepth
The nested depth in the view resolution, this enables us to limit the depth of nested views.
- maxNestedViewDepth
The maximum allowed depth of nested view resolution.
- relationCache
A mapping from qualified table names and time travel spec to resolved relations. This can ensure that the table is resolved only once if a table is used multiple times in a query.
- referredTempViewNames
All the temp view names referred by the current view we are resolving. It's used to make sure the relation resolution is consistent between view creation and view resolution. For example, if
twas a permanent table when the current view was created, it should still be a permanent table when resolving the current view, even if a temp viewthas been created.- outerPlan
The query plan from the outer query that can be used to resolve star expressions in a subquery.
- Alphabetic
- By Inheritance
- AnalysisContext
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
AnalysisContext(catalogAndNamespace: Seq[String] = Nil, nestedViewDepth: Int = 0, maxNestedViewDepth: Int = -1, relationCache: Map[(Seq[String], Option[TimeTravelSpec]), LogicalPlan] = mutable.Map.empty, referredTempViewNames: Seq[Seq[String]] = Seq.empty, referredTempFunctionNames: Set[String] = mutable.Set.empty, outerPlan: Option[LogicalPlan] = None)
- catalogAndNamespace
The catalog and namespace used in the view resolution. This overrides the current catalog and namespace when resolving relations inside views.
- nestedViewDepth
The nested depth in the view resolution, this enables us to limit the depth of nested views.
- maxNestedViewDepth
The maximum allowed depth of nested view resolution.
- relationCache
A mapping from qualified table names and time travel spec to resolved relations. This can ensure that the table is resolved only once if a table is used multiple times in a query.
- referredTempViewNames
All the temp view names referred by the current view we are resolving. It's used to make sure the relation resolution is consistent between view creation and view resolution. For example, if
twas a permanent table when the current view was created, it should still be a permanent table when resolving the current view, even if a temp viewthas been created.- outerPlan
The query plan from the outer query that can be used to resolve star expressions in a subquery.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val catalogAndNamespace: Seq[String]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val maxNestedViewDepth: Int
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val nestedViewDepth: Int
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val outerPlan: Option[LogicalPlan]
- val referredTempFunctionNames: Set[String]
- val referredTempViewNames: Seq[Seq[String]]
- val relationCache: Map[(Seq[String], Option[TimeTravelSpec]), LogicalPlan]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated