Packages

class MetadataResolver extends 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
DelegatesResolutionToExtensions, RelationMetadataProvider, LookupCatalog, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MetadataResolver
  2. DelegatesResolutionToExtensions
  3. RelationMetadataProvider
  4. LookupCatalog
  5. Logging
  6. AnyRef
  7. 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val catalogManager: CatalogManager
    Definition Classes
    MetadataResolver → LookupCatalog
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. def currentCatalog: CatalogPlugin

    Returns the current catalog set.

    Returns the current catalog set.

    Definition Classes
    LookupCatalog
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. val extensions: Seq[ResolverExtension]
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. 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
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  14. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  15. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  18. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  19. def logDebug(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  20. def logDebug(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  21. def logDebug(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  22. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  23. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  24. def logError(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  25. def logError(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  26. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  27. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  28. def logInfo(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  29. def logInfo(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  30. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  31. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  32. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  33. def logTrace(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  34. def logTrace(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  35. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  36. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  37. def logWarning(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  38. def logWarning(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  39. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  40. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  41. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  42. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  43. 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
  44. 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
    MetadataResolverRelationMetadataProvider
  45. 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
    MetadataResolverRelationMetadataProvider
  46. 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. If the generic metadata resolution using RelationResolution wasn't successful, we resort to using extensions. Otherwise, we fail with an exception.

    Definition Classes
    MetadataResolverRelationMetadataProvider
  47. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  48. def toString(): String
    Definition Classes
    AnyRef → Any
  49. 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.

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

Inherited from Any

Ungrouped