DeltaGenerateCommand — Executing Generation Functions On Delta Tables

val generateQ = """GENERATE symlink_format_manifest for table delta.`/tmp/delta/t1`"""
scala> sql(generateQ).foreach(_ => ())

DeltaGenerateCommand uses a lookup table for generation functions per mode:

DeltaGenerateCommand is created when:

Creating DeltaGenerateCommand Instance

DeltaGenerateCommand takes the following to be created:

Running Command — run Method

run(sparkSession: SparkSession): Seq[Row]
run is part of the RunnableCommand contract to…​FIXME.

run finds the generate function for the mode (in the modeNameToGenerationFunc registry) and applies (executes) it to the DeltaLog.

run throws an AnalysisException when the version of the snapshot of the DeltaLog is negative (less than 0):

Delta table not found at [tablePath].

run throws an IllegalArgumentException for unsupported mode:

Specified mode '[modeName]' is not supported. Supported modes are: symlink_format_manifest