class Resolver extends LogicalPlanResolver with ResolvesOperatorChildren with DelegatesResolutionToExtensions
The Resolver implements a single-pass bottom-up analysis algorithm in the Catalyst.
The functions here generally traverse the LogicalPlan nodes recursively, constructing and returning the resolved LogicalPlan nodes bottom-up. This is the primary entry point for implementing SQL and DataFrame plan analysis, wherein the resolve method accepts a fully unresolved LogicalPlan and returns a fully resolved LogicalPlan in response with all data types and attribute reference ID assigned for valid requests. This resolver also takes responsibility to detect any errors in the initial SQL query or DataFrame and return appropriate error messages including precise parse locations wherever possible.
The Resolver is a one-shot object per each SQL/DataFrame logical plan, the calling code must re-create it for every new analysis run.
- Alphabetic
- By Inheritance
- Resolver
- DelegatesResolutionToExtensions
- ResolvesOperatorChildren
- TreeNodeResolver
- QueryErrorsBase
- DataTypeErrorsBase
- SQLConfHelper
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Resolver(catalogManager: CatalogManager, extensions: Seq[ResolverExtension] = Seq.empty, metadataResolverExtensions: Seq[ResolverExtension] = Seq.empty)
- catalogManager
CatalogManager for relation and identifier resolution.
- extensions
A list of ResolverExtensions that will be used to resolve external operators.
- metadataResolverExtensions
A list of ResolverExtensions that will be used to resolve relation operators in MetadataResolver.
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
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def conf: SQLConf
The active config object within the current scope.
The active config object within the current scope. See SQLConf.get for more information.
- Definition Classes
- SQLConfHelper
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- val extensions: Seq[ResolverExtension]
- Definition Classes
- Resolver → DelegatesResolutionToExtensions
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def getCteRegistry: CteRegistry
Get the CteRegistry which is a single instance per query resolution.
- def getNameScopes: NameScopeStack
Get NameScopeStack bound to the used Resolver.
- def getQueryContext(context: QueryContext): Array[QueryContext]
- Definition Classes
- DataTypeErrorsBase
- def getSummary(sqlContext: QueryContext): String
- Definition Classes
- DataTypeErrorsBase
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lookupMetadataAndResolve(unresolvedPlan: LogicalPlan, analyzerBridgeState: Option[AnalyzerBridgeState] = None): LogicalPlan
This method is an analysis entry point.
This method is an analysis entry point. It resolves the metadata and invokes resolve, which does most of the analysis work.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def ordinalNumber(i: Int): String
- Definition Classes
- QueryErrorsBase
- def quoteByDefault(elem: String): String
- Attributes
- protected
- Definition Classes
- DataTypeErrorsBase
- def resolve(unresolvedPlan: LogicalPlan): LogicalPlan
This method takes an unresolved LogicalPlan and chooses the right
resolve*method using pattern matching on theunresolvedPlantype.This method takes an unresolved LogicalPlan and chooses the right
resolve*method using pattern matching on theunresolvedPlantype. This pattern matching enumerates all the operator node types that are supported by the single-pass analysis.When developers introduce a new unresolved node type to the Catalyst, they should implement a corresponding
resolve*method in the Resolver and add it to this pattern match list.resolve will be called recursively during the unresolved plan traversal eventually producing a fully resolved plan or a descriptive error message.
- Definition Classes
- Resolver → TreeNodeResolver
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toDSOption(option: String): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLConf(conf: String): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLConfVal(conf: String): String
- Definition Classes
- QueryErrorsBase
- def toSQLExpr(e: Expression): String
- Definition Classes
- QueryErrorsBase
- def toSQLId(parts: Seq[String]): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLId(parts: String): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLStmt(text: String): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLType(t: AbstractDataType): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLType(text: String): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLValue(v: Any, t: DataType): String
- Definition Classes
- QueryErrorsBase
- def toSQLValue(value: Double): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLValue(value: Float): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLValue(value: Long): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLValue(value: Int): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLValue(value: Short): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLValue(value: UTF8String): String
- Definition Classes
- DataTypeErrorsBase
- def toSQLValue(value: String): String
- Definition Classes
- DataTypeErrorsBase
- def toString(): String
- Definition Classes
- AnyRef → Any
- def tryDelegateResolutionToExtension(unresolvedOperator: LogicalPlan, resolver: LogicalPlanResolver): Option[LogicalPlan]
Find the suitable extension for
unresolvedOperatorresolution and resolve it with that extension.Find the suitable extension for
unresolvedOperatorresolution and resolve it with that extension. Usually extensions return resolved relation nodes, so we generically update the name scope without matching for specific relations, for simplicity.We match the extension once to reduce the number of ResolverExtension.resolveOperator.isDefinedAt calls, because those can be expensive.
- returns
Some(resolutionResult)if the extension was found andunresolvedOperatorwas resolved,Noneotherwise.
- Attributes
- protected
- Definition Classes
- DelegatesResolutionToExtensions
- Exceptions thrown
`AMBIGUOUS_RESOLVER_EXTENSION`if there were several matched extensions for this operator.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withResolvedChildren[OperatorType <: LogicalPlan](unresolvedOperator: OperatorType, resolve: (LogicalPlan) => LogicalPlan): OperatorType
Resolves generic LogicalPlan children and returns its copy with children resolved.
Resolves generic LogicalPlan children and returns its copy with children resolved.
- Attributes
- protected
- Definition Classes
- ResolvesOperatorChildren
- def withSQLConf[T](pairs: (String, String)*)(f: => T): T
Sets all SQL configurations specified in
pairs, callsf, and then restores all SQL configurations.Sets all SQL configurations specified in
pairs, callsf, and then restores all SQL configurations.- Attributes
- protected
- Definition Classes
- SQLConfHelper
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)