Skip to content

InitialSnapshot

InitialSnapshot is an initial Snapshot of a delta table (at the logPath) that is about to be created (so there is no delta log yet).

InitialSnapshot is a Snapshot with the following:

Snapshot Value
LogSegment Empty transaction log directory (for the logPath)
minFileRetentionTimestamp -1
minSetTransactionRetentionTimestamp (undefined)
Path logPath
Timestamp -1
Version -1
VersionChecksum (undefined)

Creating Instance

InitialSnapshot takes the following to be created:

InitialSnapshot is created when:

Metadata

InitialSnapshot can be given a Metadata when created. Unless given, InitialSnapshot creates a Metadata with the following:

Metadata Value
configuration mergeGlobalConfigs
createdTime Current time (in ms)

computedState

Signature
computedState: Snapshot.State

computedState is part of the Snapshot abstraction.

computedState initialState.

Lazy Value

computedState is a Scala lazy value to guarantee that the code to initialize it is executed once only (when accessed for the first time) and the computed value never changes afterwards.

Learn more in the Scala Language Specification.

Question

Why does InitialSnapshot define the private initialState to initialize computedState? They could be one, couldn't they?

Initial State

initialState: Snapshot.State

initialState...FIXME