DeletionVectorUtils¶
deletionVectorsReadable¶
deletionVectorsReadable(
snapshot: SnapshotDescriptor,
newProtocol: Option[Protocol] = None,
newMetadata: Option[Metadata] = None): Boolean
deletionVectorsReadable(
protocol: Protocol,
metadata: Metadata): Boolean
deletionVectorsReadable is enabled (true) when the following all hold:
- DeletionVectorsTableFeature is supported by the given Protocol
- The format provider is
parquet(in the given Metadata)
deletionVectorsReadable is used when:
ScanWithDeletionVectorsis requested to dvEnabledScanForDeleteCommandis requested to performDeleteDeletionVectorUtilsis requested to isTableDVFree, fileIndexSupportsReadingDVs- RestoreTableCommand is executed
StatisticsCollectionis requested to recompute
deletionVectorsWritable¶
deletionVectorsWritable(
protocol: Protocol,
metadata: Metadata): Boolean
deletionVectorsWritable(
snapshot: SnapshotDescriptor,
newProtocol: Option[Protocol] = None,
newMetadata: Option[Metadata] = None): Boolean
deletionVectorsWritable is enabled (true) when the following all hold:
- DeletionVectorsTableFeature is supported by the given Protocol
- delta.enableDeletionVectors is enabled in the table metadata (in the given Metadata)
deletionVectorsWritable is used when:
OptimisticTransactionImplis requested to getAssertDeletionVectorWellFormedFunc- DELETE command is executed (and requested to shouldWritePersistentDeletionVectors)
- MERGE command is executed (and requested to shouldWritePersistentDeletionVectors)
- UPDATE command is executed (and requested to shouldWritePersistentDeletionVectors)
CheckNoDeletionVectoris executed (for Iceberg-compatibility)
isTableDVFree¶
isTableDVFree(
spark: SparkSession,
snapshot: Snapshot): Boolean
isTableDVFree indicates whether Deletion Vectors are present in the delta table (per the given Snapshot).
Note
Used only for GenerateSymlinkManifest.
isTableDVFree is true unless deletionVectorsReadable (in the given Snapshot) and there are deletionVectors in the allFiles in the given Snapshot.
isTableDVFree is used when:
Protocolis requested to assertTablePropertyConstraintsSatisfied (with compatibility.symlinkFormatManifest.enabled enabled)GenerateSymlinkManifestImplis requested togenerateFullManifest