// `tableAlias` undefined so columns default to `colN`
val q = sql("VALUES 1, 2, 3")
scala> println(q.queryExecution.logical.numberedTreeString)
00 'UnresolvedInlineTable [col1], [List(1), List(2), List(3)]
// CreateNamedStruct with `tableAlias`
val q = sql("VALUES (1, 'a'), (2, 'b') AS t1(a, b)")
scala> println(q.queryExecution.logical.numberedTreeString)
00 'SubqueryAlias t1
01 +- 'UnresolvedInlineTable [a, b], [List(1, a), List(2, b)]
UnresolvedInlineTable Logical Operator
UnresolvedInlineTable is a unary logical operator that represents an inline table (aka virtual table in Apache Hive).
UnresolvedInlineTable is created when AstBuilder is requested to parse an inline table in a SQL statement.
UnresolvedInlineTable is never resolved (and is converted to a LocalRelation in ResolveInlineTables logical resolution rule).
UnresolvedInlineTable uses no output schema attributes.
UnresolvedInlineTable uses expressionsResolved flag that is on (true) only when all the Catalyst expressions in the rows are resolved.
Creating UnresolvedInlineTable Instance
UnresolvedInlineTable takes the following when created:
-
Rows (as Catalyst expressions for every row, i.e.
Seq[Seq[Expression]])