FileAction¶
FileAction
is an extension of the Action abstraction for data file-related actions.
Contract¶
dataChange¶
dataChange: Boolean
Controls the transaction isolation level for committing a transaction
Isolation Level | Description |
---|---|
SnapshotIsolation | No data changes (dataChange is false for all FileAction s to be committed) |
Serializable |
There can be no RemoveFiles with dataChange
enabled for appendOnly unmodifiable tables (or an UnsupportedOperationException is thrown).
dataChange Value | When |
---|---|
false | InMemoryLogReplay is requested to replay a version |
true | ConvertToDeltaCommand is executed (and requested to create an AddFile with the flag turned on) |
Opposite of dataChange option | WriteIntoDelta is requested to write (with dataChange option turned off for rearrange-only writes) |
dataChange
is used when:
OptimisticTransactionImpl
is requested to commit (and determines the isolation level), prepareCommit, attempt a commit (forbytesNew
statistics)DeltaSource
is requested to getChanges (and verifyStreamHygieneAndFilterAddFiles)
numLogicalRecords¶
numLogicalRecords: Option[Long]
Always None
:
See:
Used when:
DeleteCommandMetrics
is requested to getDeletedRowsFromAddFilesAndUpdateMetricsTouchedFileWithDV
is requested toisFullyReplaced
MergeIntoCommand
is requested to writeInsertsOnlyWhenNoMatchedClausesWriteIntoDelta
is requested to registerReplaceWhereMetricsTransactionalWrite
is requested to writeFilesOptimizeMetadataOnlyDeltaQuery
is requested to extractGlobalCount
Partition Values¶
partitionValues: Map[String, String]
Partition columns to their values of this logical file
Note
partitionValues
is not used.
Path¶
path: String
Tags¶
tags: Map[String, String]
Metadata about this logical file
Used to get the value of a tag
Implementations¶
Sealed Trait
FileAction
is a Scala sealed trait which means that all of the implementations are in the same compilation unit (a single file).
Learn more in the Scala Language Specification.
Tag Value¶
getTag(tagName: String): Option[String]
getTag
gets the value of the given tag (by tagName
), if available.
getTag
is used when:
AddFile
is requested for a tag value