Skip to content

UnresolvedRelation Leaf Logical Operator

[[tableIdentifier]][[creating-instance]] UnresolvedRelation is a[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).


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

Table or view not found: [tableIdentifier]

UnresolvedRelation is <> when:


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

Back to top