UnresolvedRelation Leaf Logical Operator for Table Reference

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 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 created when:


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

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

results matching ""

    No results matching ""