Skip to content

Commit

Permalink
LegacyWriterFeature
Browse files Browse the repository at this point in the history
  • Loading branch information
jaceklaskowski committed Jan 11, 2025
1 parent 7ee8420 commit 9a85b85
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/identity-columns/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Identity Columns

**Identity Columns** is a new feature in Delta Lake 3.3.0 that allows assigning unique values for each record writted out into a table (unless column values are provided explicitly).
**Identity Columns** is a new feature in Delta Lake 3.3.0 that allows assigning unique values for each record written out into a table (unless column values are provided explicitly).

Identity Columns feature is enabled by default (using [spark.databricks.delta.identityColumn.enabled](../configuration-properties/index.md#spark.databricks.delta.identityColumn.enabled)).

Expand Down
16 changes: 16 additions & 0 deletions docs/table-features/LegacyWriterFeature.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
# LegacyWriterFeature

`LegacyWriterFeature` is a marker extension of the [TableFeature](TableFeature.md) abstraction for [writer table features](#implementations) that were released before [Table Features](index.md) (as a `LegacyFeatureType`).

`LegacyWriterFeature`s enforce that the [minimum reader protocol version required](TableFeature.md#minReaderVersion) is always `0`.

`LegacyWriterFeature` is used when `TableFeatureSupport` is requested to [remove a table feature](TableFeatureSupport.md#removeFeature) (alongside [WriterFeature](WriterFeature.md)s).

## Implementations

??? note "Sealed Abstract Class"
`LegacyWriterFeature` is a Scala **sealed abstract class** which means that all of the implementations are in the same compilation unit (a single file).

* [AppendOnlyTableFeature](../append-only-tables/AppendOnlyTableFeature.md)
* [ChangeDataFeedTableFeature](../change-data-feed/ChangeDataFeedTableFeature.md)
* [CheckConstraintsTableFeature](../check-constraints/CheckConstraintsTableFeature.md)
* [GeneratedColumnsTableFeature](../generated-columns/GeneratedColumnsTableFeature.md)
* [IdentityColumnsTableFeature](../identity-columns/IdentityColumnsTableFeature.md)
* [InvariantsTableFeature](../column-invariants/InvariantsTableFeature.md)
* `LegacyReaderWriterFeature`

## Creating Instance

`LegacyWriterFeature` takes the following to be created:

* <span id="name"> [Name](TableFeature.md#name)
* <span id="minWriterVersion"> [Minimum writer protocol version required](TableFeature.md#minWriterVersion)
25 changes: 12 additions & 13 deletions docs/table-features/TableFeature.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

`TableFeature` takes the following to be created:

* [name](#name)
* <span id="minReaderVersion"> `minReaderVersion`
* <span id="minWriterVersion"> `minWriterVersion`
* [Name](#name)
* <span id="minReaderVersion"> Minimum reader protocol version required
* <span id="minWriterVersion"> Minimum writer protocol version required

!!! note "Abstract Class"
`TableFeature` is an abstract class and cannot be created directly. It is created indirectly for the [concrete TableFeatures](#implementations).
Expand All @@ -25,6 +25,8 @@ The name of this table feature

The name can only be a combination of letters, `-`s (dashes) and `_`s (underscores).

---

Used when:

* `DeltaLog` is requested to [assertTableFeaturesMatchMetadata](../DeltaLog.md#assertTableFeaturesMatchMetadata) (for reporting purposes)
Expand Down Expand Up @@ -55,7 +57,7 @@ Used when:

## Implementations

* `LegacyWriterFeature`
* [LegacyWriterFeature](LegacyWriterFeature.md)
* [WriterFeature](WriterFeature.md)

??? note "Sealed Abstract Class"
Expand All @@ -69,20 +71,17 @@ allSupportedFeaturesMap: Map[String, TableFeature]

`allSupportedFeaturesMap` is a collection of [TableFeature](TableFeature.md)s by their lower-case [name](#name):

* `AllowColumnDefaultsTableFeature`
* [AppendOnlyTableFeature](../append-only-tables/AppendOnlyTableFeature.md)
* [ChangeDataFeedTableFeature](../change-data-feed/ChangeDataFeedTableFeature.md)
* `CheckConstraintsTableFeature`
* [CheckConstraintsTableFeature](../check-constraints/CheckConstraintsTableFeature.md)
* [ClusteringTableFeature](../liquid-clustering/ClusteringTableFeature.md)
* `ColumnMappingTableFeature`
* [ColumnMappingTableFeature](../column-mapping/ColumnMappingTableFeature.md)
* [DeletionVectorsTableFeature](../deletion-vectors/DeletionVectorsTableFeature.md)
* [DomainMetadataTableFeature](DomainMetadataTableFeature.md)
* `GeneratedColumnsTableFeature`
* `IcebergCompatV1TableFeature`
* `IcebergCompatV2TableFeature`
* `InvariantsTableFeature`
* `TimestampNTZTableFeature`
* `V2CheckpointTableFeature`
* [GeneratedColumnsTableFeature](../generated-columns/GeneratedColumnsTableFeature.md)
* [IdentityColumnsTableFeature](../identity-columns/IdentityColumnsTableFeature.md)
* [InvariantsTableFeature](../column-invariants/InvariantsTableFeature.md)
* _others_

---

Expand Down

0 comments on commit 9a85b85

Please sign in to comment.