Packages

class MetadataResolver extends SQLConfHelper with RelationMetadataProvider with DelegatesResolutionToExtensions

The MetadataResolver performs relation metadata resolution based on the unresolved plan at the start of the analysis phase. Usually it does RPC calls to some table catalog and to table metadata itself.

RelationsWithResolvedMetadata is a map from relation ID to the relations with resolved metadata. It's produced by resolve and is used later in Resolver to replace UnresolvedRelations.

This object is one-shot per SQL query or DataFrame program resolution.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MetadataResolver
  2. DelegatesResolutionToExtensions
  3. RelationMetadataProvider
  4. LookupCatalog
  5. Logging
  6. SQLConfHelper
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new MetadataResolver(catalogManager: CatalogManager, relationResolution: RelationResolution, extensions: Seq[ResolverExtension] = Seq.empty)

Type Members

  1. implicit class LogStringContext extends AnyRef
    Definition Classes
    Logging
  2. type RelationsWithResolvedMetadata = HashMap[RelationId, LogicalPlan]
    Definition Classes
    RelationMetadataProvider

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. def MDC(key: LogKey, value: Any): MDC
    Attributes
    protected
    Definition Classes
    Logging
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. val catalogManager: CatalogManager
    Definition Classes
    MetadataResolver → LookupCatalog
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  8. 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
  9. def currentCatalog: CatalogPlugin

    Returns the current catalog set.

    Returns the current catalog set.

    Definition Classes
    LookupCatalog
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. val extensions: Seq[ResolverExtension]
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  14. def getRelationWithResolvedMetadata(unresolvedRelation: UnresolvedRelation): Option[LogicalPlan]

    Get the LogicalPlan with resolved metadata for the given UnresolvedRelation.

    Get the LogicalPlan with resolved metadata for the given UnresolvedRelation.

    java.util.HashMap returns null if the key is not found, so we wrap it in an Option.

    Definition Classes
    RelationMetadataProvider
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  16. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  17. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  20. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  21. def logBasedOnLevel(level: Level)(f: => MessageWithContext): Unit
    Attributes
    protected
    Definition Classes
    Logging
  22. def logDebug(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  23. def logDebug(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  24. def logDebug(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  25. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  26. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  27. def logError(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  28. def logError(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  29. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  30. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  31. def logInfo(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  32. def logInfo(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  33. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  34. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  35. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  36. def logTrace(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  37. def logTrace(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  38. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  39. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  40. def logWarning(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  41. def logWarning(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  42. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  43. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  44. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  45. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  46. def relationIdFromUnresolvedRelation(unresolvedRelation: UnresolvedRelation): RelationId

    Returns the RelationId for the given UnresolvedRelation.

    Returns the RelationId for the given UnresolvedRelation. Here we use relationResolution to expand the UnresolvedRelation identifier fully, so that our RelationId uniquely identifies the unresolvedRelation.

    This method is public, because it's used in MetadataResolverSuite.

    Definition Classes
    RelationMetadataProvider
  47. val relationResolution: RelationResolution

    relationResolution is used by the RelationMetadataProvider to expand relation identifiers in relationIdFromUnresolvedRelation.

    relationResolution is used by the RelationMetadataProvider to expand relation identifiers in relationIdFromUnresolvedRelation.

    Definition Classes
    MetadataResolver → RelationMetadataProvider
  48. val relationsWithResolvedMetadata: HashMap[RelationId, LogicalPlan]

    relationsWithResolvedMetadata is a map from relation ID to the specific LogicalPlan with resolved metadata, like UnresolvedCatalogRelation or View.

    relationsWithResolvedMetadata is a map from relation ID to the specific LogicalPlan with resolved metadata, like UnresolvedCatalogRelation or View. It's filled by the specific RelationMetadataProvider implementation and is queried in getRelationWithResolvedMetadata.

    Definition Classes
    MetadataResolver → RelationMetadataProvider
  49. def resolve(unresolvedPlan: LogicalPlan): Unit

    Resolves the relation metadata for unresolvedPlan.

    Resolves the relation metadata for unresolvedPlan. Usually this involves several blocking calls for the UnresolvedRelations present in that tree. During the unresolvedPlan traversal we fill relationsWithResolvedMetadata with resolved metadata by relation id. This map will be used to resolve the plan in single-pass by the Resolver using getRelationWithResolvedMetadata. We always try to complete the default resolution using extensions.

    Definition Classes
    MetadataResolver → RelationMetadataProvider
  50. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  51. def toString(): String
    Definition Classes
    AnyRef → Any
  52. 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.

  53. def tryResolveRelation(unresolvedRelation: UnresolvedRelation): Unit
  54. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  55. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  56. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  57. def withLogContext(context: Map[String, String])(body: => Unit): Unit
    Attributes
    protected
    Definition Classes
    Logging
  58. 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
  59. object AsTableIdentifier

    Extract legacy table identifier from a multi-part identifier.

    Extract legacy table identifier from a multi-part identifier.

    For legacy support only. Please use CatalogAndIdentifier instead on DSv2 code paths.

    Definition Classes
    LookupCatalog
  60. object CatalogAndIdentifier

    Extract catalog and identifier from a multi-part name with the current catalog if needed.

    Extract catalog and identifier from a multi-part name with the current catalog if needed. Catalog name takes precedence over identifier, but for a single-part name, identifier takes precedence over catalog name.

    Note that, this pattern is used to look up permanent catalog objects like table, view, function, etc. If you need to look up temp objects like temp view, please do it separately before calling this pattern, as temp objects don't belong to any catalog.

    Definition Classes
    LookupCatalog
  61. object CatalogAndNamespace

    Extract catalog and namespace from a multi-part name with the current catalog if needed.

    Extract catalog and namespace from a multi-part name with the current catalog if needed. Catalog name takes precedence over namespaces.

    Definition Classes
    LookupCatalog
  62. object NonSessionCatalogAndIdentifier

    Extract non-session catalog and identifier from a multi-part identifier.

    Extract non-session catalog and identifier from a multi-part identifier.

    Definition Classes
    LookupCatalog
  63. object SessionCatalogAndIdentifier

    Extract session catalog and identifier from a multi-part identifier.

    Extract session catalog and identifier from a multi-part identifier.

    Definition Classes
    LookupCatalog

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 LookupCatalog

Inherited from Logging

Inherited from SQLConfHelper

Inherited from AnyRef

Inherited from Any

Ungrouped