TableFeature¶
TableFeature is an abstraction of table features.
TableFeature is Serializable (Java).
Creating Instance¶
TableFeature takes the following to be created:
- Name
- Minimum reader protocol version required
- Minimum writer protocol version required
Abstract Class
TableFeature is an abstract class and cannot be created directly. It is created indirectly for the concrete TableFeatures.
Name¶
name: String
The name of this table feature
The name can only be a combination of letters, -s (dashes) and _s (underscores).
Used when:
DeltaLogis requested to assertTableFeaturesMatchMetadata (for reporting purposes)OptimisticTransactionImplis requested to updateMetadataInternal and recordProtocolChangesTableFeatureis requested to allSupportedFeaturesMapProtocolis requested to forTableFeatureTableFeatureSupportis requested to withFeature, canUpgradeTo, isFeatureSupported, propertyKey, defaultPropertyKeyDescribeDeltaDetailCommandis executed (and requested to describeDeltaTable)
Required Features¶
requiredFeatures: Set[TableFeature]
The required TableFeatures that this TableFeature depends on
Default: (empty)
See:
Used when:
Protocolis requested to getDependencyClosureTableFeatureSupportis requested to withFeature
Implementations¶
Sealed Abstract Class
TableFeature is a Scala sealed abstract class which means that all of the implementations are in the same compilation unit (a single file).
allSupportedFeaturesMap¶
allSupportedFeaturesMap: Map[String, TableFeature]
allSupportedFeaturesMap is a collection of TableFeatures by their lower-case name:
- AppendOnlyTableFeature
- ChangeDataFeedTableFeature
- CheckConstraintsTableFeature
- ClusteringTableFeature
- ColumnMappingTableFeature
- DeletionVectorsTableFeature
- DomainMetadataTableFeature
- GeneratedColumnsTableFeature
- IdentityColumnsTableFeature
- InvariantsTableFeature
- others
allSupportedFeaturesMap is used when:
TableFeatureis requested to look up the table featureActionis requested to supportedProtocolVersionProtocolis requested to extractAutomaticallyEnabledFeaturesTableFeatureSupportis requested for the implicitlySupportedFeatures
Looking Up Table Feature¶
featureNameToFeature(
featureName: String): Option[TableFeature]
featureNameToFeature tries to find the TableFeature by the given featureName in the allSupportedFeaturesMap.
featureNameToFeature is used when:
DeltaLogis requested to assertTableFeaturesMatchMetadataOptimisticTransactionImplis requested to updateMetadataInternalProtocolis requested to extractAutomaticallyEnabledFeaturesTableFeatureSupportis requested for the implicitlyAndExplicitlySupportedFeaturesTableFeatureProtocolUtilsis requested to getSupportedFeaturesFromTableConfigs