Skip to content

UnresolvedRelation Leaf Logical Operator for Table Reference

[[tableIdentifier]][[creating-instance]] UnresolvedRelation is a LeafNode.md[leaf logical operator] to represent a table reference in a logical query plan that has yet to be resolved (i.e. looked up in a catalog).

[NOTE]

If after Logical Analyzer has finished analyzing a logical query plan the plan has still a UnresolvedRelation it CheckAnalysis.md#UnresolvedRelation[fails the analyze phase] with the following AnalysisException:

Table or view not found: [tableIdentifier]

UnresolvedRelation is <> when:

[TIP]

Use table operator from Catalyst DSL to create a UnresolvedRelation logical operator, e.g. for testing or Spark SQL internals exploration.

[source, scala]

import org.apache.spark.sql.catalyst.dsl.plans._ val plan = table(db = "myDB", ref = "t1") scala> println(plan.numberedTreeString) 00 'UnresolvedRelation myDB.t1


====

NOTE: UnresolvedRelation is resolved to...FIXME


Last update: 2021-02-18