RemovableFeature Table Features¶
RemovableFeature is an extension of the TableFeature abstraction for table features that can be removed.
Contract (Subset)¶
actionUsesFeature¶
See:
Used when:
RemovableFeatureis requested to containsFeatureTraces
Validate Drop Invariants¶
See:
Used when:
ColumnMappingPreDowngradeCommandis requested to removeFeatureTracesIfNeededDeletionVectorsPreDowngradeCommandis requested to removeFeatureTracesIfNeeded- ... (other commands)
TableFeatureis requested to validateFeatureRemovalAtSnapshotAlterTableDropFeatureDeltaCommandis requested to executeDropFeatureWithCheckpointProtection and executeDropFeatureWithHistoryTruncation
preDowngradeCommand¶
Create a PreDowngradeTableFeatureCommand with the given DeltaTableV2
See:
Used when:
AlterTableDropFeatureDeltaCommandis requested to executeDropFeatureWithCheckpointProtection and executeDropFeatureWithHistoryTruncation
Implementations¶
- CatalogOwnedTableFeature
CheckConstraintsTableFeatureCheckpointProtectionTableFeatureColumnMappingTableFeature- CoordinatedCommitsTableFeature
- DeletionVectorsTableFeature
- DomainMetadataTableFeature
- InCommitTimestampTableFeature
MaterializePartitionColumnsTableFeatureRedirectReaderWriterFeatureRedirectWriterOnlyFeature- RowTrackingFeature
TypeWideningTableFeatureBaseV2CheckpointTableFeature- VacuumProtocolCheckTableFeature
Sealed Trait
RemovableFeature 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.
historyContainsFeature¶
historyContainsFeature(
spark: SparkSession,
table: DeltaTableV2,
downgradeTxnReadSnapshot: Snapshot): Boolean
historyContainsFeature...FIXME
historyContainsFeature is used when:
AlterTableDropFeatureDeltaCommandis requested to executeDropFeatureWithHistoryTruncation
containsFeatureTraces¶
containsFeatureTraces checks out whether the given dataset of actions has got any Action that uses this feature.
containsFeatureTraces is used when:
RemovableFeatureis requested to historyContainsFeature
requiresHistoryProtection¶
requiresHistoryProtection is enabled (true) when this table feature is a ReaderWriterFeatureType.
requiresHistoryProtection is used when:
RemovableFeatureis requested to historyContainsFeature and isProtocolRemovingFeatureWithHistoryProtectionAlterTableDropFeatureDeltaCommandis executed