Operation

Operation is an abstraction of operations that can be performed on a Delta table.

Operation has a name and parameters (that are simply used to create a CommitInfo for OptimisticTransactionImpl being committed and, as a way to bypass a transaction, ConvertToDeltaCommand).

Contract

name

name: String

Name of the operation (to create a CommitInfo)

Used when:

  • OptimisticTransactionImpl is requested to commit

  • ConvertToDeltaCommand command is requested to streamWrite (when executed)

parameters

parameters: Map[String, Any]

Parameters of the operation (to create a CommitInfo with the JSON-encoded values)

Used when Operation is requested for parameters with the values in JSON format.

Operations

Operation is a Scala sealed trait which means that all the implementations are in the same compilation unit (a single file).

AddColumns

ChangeColumn

ComputeStats

Convert

CreateTable

Delete

FileNotificationRetention

Fsck

ManualUpdate

name: Manual Update

parameters: Empty

Merge

Optimize

ReplaceColumns

ReplaceTable

ResetZCubeInfo

SetTableProperties

StreamingUpdate

Truncate

UnsetTableProperties

Update

UpdateColumnMetadata

UpdateSchema

UpgradeProtocol

Write

Serializing Parameter Values (to JSON Format)

jsonEncodedValues: Map[String, String]

jsonEncodedValues converts the values of the parameters to JSON format.

jsonEncodedValues is used when:

operationMetrics Method

operationMetrics: Set[String]

operationMetrics…​FIXME

operationMetrics is used when…​FIXME

transformMetrics Method

transformMetrics(
  metrics: Map[String, SQLMetric]): Map[String, String]

transformMetrics…​FIXME

transformMetrics is used when…​FIXME

userMetadata Method

userMetadata: Option[String] = None

userMetadata of the operation.

userMetadata is used when OptimisticTransactionImpl is requested to getUserMetadata.