Skip to content

DescribeDeltaDetailCommand

DescribeDeltaDetailCommand is a leaf RunnableCommand (Spark SQL) that represents DESCRIBE DETAIL SQL command at execution.

(DESC | DESCRIBE) DETAIL (path | table)

Creating Instance

DescribeDeltaDetailCommand takes the following to be created:

  • (optional) Table Path
  • (optional) Table identifier

DescribeDeltaDetailCommand is created when:

Output (Schema) Attributes

QueryPlan
output: Seq[Attribute]

output is part of the QueryPlan (Spark SQL) abstraction.

output is the fields of TableDetail.

Executing Command

RunnableCommand
run(
  sparkSession: SparkSession): Seq[Row]

run is part of the RunnableCommand (Spark SQL) abstraction.

run...FIXME

describeDeltaTable

describeDeltaTable(
  sparkSession: SparkSession,
  deltaLog: DeltaLog,
  snapshot: Snapshot,
  tableMetadata: Option[CatalogTable]): Seq[Row]

describeDeltaTable...FIXME

Demo

DESCRIBE DETAIL '/tmp/delta/users'
scala> q.show
+------+--------------------+----+-----------+--------------------+--------------------+-------------------+----------------+--------+-----------+----------+----------------+----------------+
|format|                  id|name|description|            location|           createdAt|       lastModified|partitionColumns|numFiles|sizeInBytes|properties|minReaderVersion|minWriterVersion|
+------+--------------------+----+-----------+--------------------+--------------------+-------------------+----------------+--------+-----------+----------+----------------+----------------+
| delta|3799b291-dbfa-4f8...|null|       null|file:/tmp/delta/u...|2020-01-06 17:08:...|2020-01-06 17:12:28| [city, country]|       4|       2581|        []|               1|               2|
+------+--------------------+----+-----------+--------------------+--------------------+-------------------+----------------+--------+-----------+----------+----------------+----------------+