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:
AstBuilderis requested to parse TABLE statement and table name, and create an UnresolvedRelation- DataFrameReader.table operator is used
- DataFrameWriterV2 operators are used:
DataStreamReader.table(Spark Structured Streaming) operator is used- table (Catalyst DSL) operator is used
Creating UnresolvedRelation¶
apply(
tableIdentifier: TableIdentifier): UnresolvedRelation
apply(
tableIdentifier: TableIdentifier,
extraOptions: CaseInsensitiveStringMap,
isStreaming: Boolean): UnresolvedRelation
apply creates an UnresolvedRelation.
apply is used when:
- DataFrameWriter.insertInto operator is used
- SparkSession.table operator is used
Name¶
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¶
resolved is disabled (false).
nodePatterns¶
nodePatterns is a single-element collection with UNRESOLVED_RELATION.