Skip to content

UnresolvedRelation Logical Operator

UnresolvedRelation is a leaf logical operator with a name (as a NamedRelation) that represents a named relation that has yet to be looked up in a catalog at analysis.

UnresolvedRelation is never resolved and has to be replaced using ResolveRelations logical resolution rule.

Creating Instance

UnresolvedRelation takes the following to be created:

  • Multi-part identifier
  • Options
  • isStreaming flag (default: false)

UnresolvedRelation is created (possibly indirectly using apply factory) when:

Creating UnresolvedRelation

apply(
  tableIdentifier: TableIdentifier): UnresolvedRelation
apply(
  tableIdentifier: TableIdentifier,
  extraOptions: CaseInsensitiveStringMap,
  isStreaming: Boolean): UnresolvedRelation

apply creates an UnresolvedRelation.


apply is used when:

Name

Signature
name: String

name is part of the NamedRelation abstraction.

name is quoted multi-part dot-separated table name.

Quoted Multi-Part Dot-Separated Table Name

tableName: String

tableName is a quoted multi-part .-separated multipartIdentifier.

resolved

Signature
resolved: Boolean

resolved is part of the LogicalPlan abstraction.

resolved is disabled (false).

nodePatterns

Signature
nodePatterns: Seq[TreePattern]

nodePatterns is part of the TreeNode abstraction.

nodePatterns is a single-element collection with UNRESOLVED_RELATION.