Commit 478184f
authored
feature: add Table Feature Info (#1462)
## What changes are proposed in this pull request?
Stacked on #1404
This PR introduces info for Delta table features including min protocol
versions, dependencies, support status, and enablement logic.
Components:
**1. `FeatureInfo` (Central Metadata Struct)**
- Contains complete for each table feature: name, min protocol versions,
feature type, requirements, support status, and enablement logic
- Static instances defined for each feature (e.g., `APPEND_ONLY_INFO`,
`DELETION_VECTORS_INFO`)
**2. `EnablementCheck` (Determines if a Feature is Active)**
- `AlwaysIfSupported`: Feature is enabled whenever it's in the protocol
(e.g., `Invariants`, `DomainMetadata`)
- `EnabledIf(fn)`: Feature is enabled only when supported AND a table
property is set (e.g., `AppendOnly` requires `append_only = true`,
`DeletionVectors` requires `enable_deletion_vectors
= true`)
**3. `KernelSupport` (Tracks Kernel Implementation Status)**
- `Supported`: Kernel fully implements this operation
- `NotSupported`: Kernel doesn't implement this operation
- `Custom(fn)`: Context-dependent support (e.g., Column Mapping may
support Scan but not CDF)
- Separate checks for `read_support` and `write_support`
**4. `FeatureRequirement` (Declares Feature Dependencies)**
- `Supported(feature)`: Another feature must be in the protocol (e.g.,
RowTracking requires DomainMetadata)
- `Enabled(feature)`: Another feature must be active (e.g.,
IcebergCompatV1 requires ColumnMapping enabled)
- `NotSupported(feature)`: Incompatible with another feature (e.g.,
IcebergCompatV1 blocks DeletionVectors)
- `NotEnabled(feature)`: Another feature must not be active (e.g.,
IcebergCompatV2 requires DeletionVectors not enabled)
- `Custom(fn)`: Custom validation logic (e.g., IcebergCompat checks
column mapping mode is 'name' or 'id')
**5. `Operation` (Context for Support Checks)**
- `Scan`: Regular table data operations
- `Cdf`: Change data feed operations
- Used by `SupportCheck::Custom` to determine context-specific support
<!--
Uncomment this section if there are any changes affecting public APIs:
### This PR affects the following public APIs
If there are breaking changes, please ensure the `breaking-changes`
label gets added by CI, and describe why the changes are needed.
Note that _new_ public APIs are not considered breaking.
-->
## How was this change tested?
<!--
Please make sure to add test cases that check the changes thoroughly
including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please
clarify how you tested, ideally via a reproducible test documented in
the PR description.
-->
New tests1 parent 4442deb commit 478184f
1 file changed
+508
-0
lines changed
0 commit comments