Packages

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.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Resolver
  2. DelegatesResolutionToExtensions
  3. ResolvesOperatorChildren
  4. TreeNodeResolver
  5. QueryErrorsBase
  6. DataTypeErrorsBase
  7. SQLConfHelper
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. 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
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. val extensions: Seq[ResolverExtension]
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. def getCteRegistry: CteRegistry

    Get the CteRegistry which is a single instance per query resolution.

  12. def getNameScopes: NameScopeStack

    Get NameScopeStack bound to the used Resolver.

  13. def getQueryContext(context: QueryContext): Array[QueryContext]
    Definition Classes
    DataTypeErrorsBase
  14. def getSummary(sqlContext: QueryContext): String
    Definition Classes
    DataTypeErrorsBase
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. 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.

  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  21. def ordinalNumber(i: Int): String
    Definition Classes
    QueryErrorsBase
  22. def quoteByDefault(elem: String): String
    Attributes
    protected
    Definition Classes
    DataTypeErrorsBase
  23. def resolve(unresolvedPlan: LogicalPlan): LogicalPlan

    This method takes an unresolved LogicalPlan and chooses the right resolve* method using pattern matching on the unresolvedPlan type.

    This method takes an unresolved LogicalPlan and chooses the right resolve* method using pattern matching on the unresolvedPlan type. 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
    ResolverTreeNodeResolver
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toDSOption(option: String): String
    Definition Classes
    DataTypeErrorsBase
  26. def toSQLConf(conf: String): String
    Definition Classes
    DataTypeErrorsBase
  27. def toSQLConfVal(conf: String): String
    Definition Classes
    QueryErrorsBase
  28. def toSQLExpr(e: Expression): String
    Definition Classes
    QueryErrorsBase
  29. def toSQLId(parts: Seq[String]): String
    Definition Classes
    DataTypeErrorsBase
  30. def toSQLId(parts: String): String
    Definition Classes
    DataTypeErrorsBase
  31. def toSQLStmt(text: String): String
    Definition Classes
    DataTypeErrorsBase
  32. def toSQLType(t: AbstractDataType): String
    Definition Classes
    DataTypeErrorsBase
  33. def toSQLType(text: String): String
    Definition Classes
    DataTypeErrorsBase
  34. def toSQLValue(v: Any, t: DataType): String
    Definition Classes
    QueryErrorsBase
  35. def toSQLValue(value: Double): String
    Definition Classes
    DataTypeErrorsBase
  36. def toSQLValue(value: Float): String
    Definition Classes
    DataTypeErrorsBase
  37. def toSQLValue(value: Long): String
    Definition Classes
    DataTypeErrorsBase
  38. def toSQLValue(value: Int): String
    Definition Classes
    DataTypeErrorsBase
  39. def toSQLValue(value: Short): String
    Definition Classes
    DataTypeErrorsBase
  40. def toSQLValue(value: UTF8String): String
    Definition Classes
    DataTypeErrorsBase
  41. def toSQLValue(value: String): String
    Definition Classes
    DataTypeErrorsBase
  42. def toString(): String
    Definition Classes
    AnyRef → Any
  43. def tryDelegateResolutionToExtension(unresolvedOperator: LogicalPlan, resolver: LogicalPlanResolver): Option[LogicalPlan]

    Find the suitable extension for unresolvedOperator resolution and resolve it with that extension.

    Find the suitable extension for unresolvedOperator resolution 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 and unresolvedOperator was resolved, None otherwise.

    Attributes
    protected
    Definition Classes
    DelegatesResolutionToExtensions
    Exceptions thrown

    `AMBIGUOUS_RESOLVER_EXTENSION` if there were several matched extensions for this operator.

  44. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  45. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  46. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  47. 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
  48. def withSQLConf[T](pairs: (String, String)*)(f: => T): T

    Sets all SQL configurations specified in pairs, calls f, and then restores all SQL configurations.

    Sets all SQL configurations specified in pairs, calls f, and then restores all SQL configurations.

    Attributes
    protected
    Definition Classes
    SQLConfHelper

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from QueryErrorsBase

Inherited from DataTypeErrorsBase

Inherited from SQLConfHelper

Inherited from AnyRef

Inherited from Any

Ungrouped