DescribeDeltaHistoryCommand¶
DescribeDeltaHistoryCommand
is a RunnableCommand
(Spark SQL) that uses DeltaHistoryManager for the commit history of a delta table.
DescribeDeltaHistoryCommand
is used for DESCRIBE HISTORY SQL command.
Creating Instance¶
DescribeDeltaHistoryCommand
takes the following to be created:
- (optional) Directory
- (optional)
TableIdentifier
- (optional) Number of commits to display
- Output Attributes (default: CommitInfo)
DescribeDeltaHistoryCommand
is created for:
- DESCRIBE HISTORY SQL command (that uses
DeltaSqlAstBuilder
to parse DESCRIBE HISTORY SQL command)
Executing Command¶
run(
sparkSession: SparkSession): Seq[Row]
run
is part of the RunnableCommand
(Spark SQL) abstraction.
run
creates a Hadoop Path
to (the location of) the delta table (based on DeltaTableIdentifier).
run
creates a DeltaLog for the delta table.
run
requests the DeltaLog
for the DeltaHistoryManager that is requested for the commit history.