Skip to content

UnresolvedInlineTable Leaf Logical Operator

UnresolvedInlineTable is a <> that represents an inline table (aka virtual table in Apache Hive).

UnresolvedInlineTable is <> when AstBuilder is requested to <> in a SQL statement.

[source, scala]

// 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)]

[[resolved]] UnresolvedInlineTable is never <> (and is converted to a <> in ResolveInlineTables logical resolution rule).

[[output]] UnresolvedInlineTable uses no <>.

[[expressionsResolved]] UnresolvedInlineTable uses expressionsResolved flag that is on (true) only when all the Catalyst expressions in the <> are <>.

=== [[creating-instance]] Creating UnresolvedInlineTable Instance

UnresolvedInlineTable takes the following when created:

  • [[names]] Column names
  • [[rows]] Rows (as <> for every row, i.e. Seq[Seq[Expression]])

Last update: 2021-05-12