RowTracking¶
checkStatsCollectedIfRowTrackingSupported¶
checkStatsCollectedIfRowTrackingSupported(
protocol: Protocol,
convertToDeltaShouldCollectStats: Boolean,
statsCollectionEnabled: Boolean): Unit
Procedure
checkStatsCollectedIfRowTrackingSupported
is a procedure (returns Unit
) so what happens inside stays inside (paraphrasing the former advertising slogan of Las Vegas, Nevada).
checkStatsCollectedIfRowTrackingSupported
...FIXME
checkStatsCollectedIfRowTrackingSupported
is used when:
- ConvertToDeltaCommand is executed (and performConvert)
isSupported¶
isSupported(
protocol: Protocol): Boolean
isSupported
says whether the given protocol supports the Row Tracking table feature.
Internally, isSupported
checks if RowTrackingFeature is supported by the given Protocol.
isSupported
is used when:
ConflictChecker
is requested to reassignRowCommitVersionsDefaultRowCommitVersion
is requested to assignIfMissingMaterializedRowTrackingColumn
is requested to updateMaterializedColumnNameRowId
is requested to isSupportedRowTracking
is requested to checkStatsCollectedIfRowTrackingSupported and isEnabled
isEnabled¶
isEnabled(
protocol: Protocol,
metadata: Metadata): Boolean
isEnabled
is enabled (true
) when the following are all met:
- delta.enableRowTracking table property is enabled (in the given table metadata)
- Row Tracking feature is supported
isEnabled
throws an IllegalStateException
when the delta.enableRowTracking table property is enabled but the feature is not supported by the given Protocol:
Table property 'delta.enableRowTracking' is set on the table
but this table version doesn't support table feature 'delta.feature.rowTracking'.
isEnabled
is used when:
DefaultRowCommitVersion
is requested to createDefaultRowCommitVersionFieldDeltaScanWithRowTrackingEnabled
is requested tounapply
MaterializedRowTrackingColumn
is requested togetAttribute
andgetMaterializedColumnName
RowCommitVersion
is requested to preserveRowCommitVersionsRowId
is requested to throwIfMaterializedRowIdColumnNameIsInvalidRowTracking
is requested to addPreservedRowTrackingTagIfNotSet
addPreservedRowTrackingTagIfNotSet¶
addPreservedRowTrackingTagIfNotSet(
snapshot: SnapshotDescriptor,
tagsMap: Map[String, String] = Map.empty): Map[String, String]
addPreservedRowTrackingTagIfNotSet
...FIXME
addPreservedRowTrackingTagIfNotSet
is used when:
- DeleteCommand is executed
- MergeIntoCommand is executed
OptimizeExecutor
is requested to commitAndRetryUpdateCommand
is requested to performUpdateRemoveColumnMappingCommand
is requested to executed
createMetadataStructFields¶
createMetadataStructFields(
protocol: Protocol,
metadata: Metadata,
nullable: Boolean): Iterable[StructField]
createMetadataStructFields
...FIXME
createMetadataStructFields
is used when:
DeltaParquetFileFormat
is requested to metadataSchemaFields
preserveRowTrackingColumns¶
preserveRowTrackingColumns(
dfWithoutRowTrackingColumns: DataFrame,
snapshot: SnapshotDescriptor): DataFrame
preserveRowTrackingColumns
...FIXME
preserveRowTrackingColumns
is used when:
DeleteCommand
is requested to performDeleteOptimizeExecutor
is requested to runOptimizeBinJobUpdateCommand
is requested to preserveRowTrackingColumnsRemoveColumnMappingCommand
is requested to writeDataClassicMergeExecutor
is requested to writeAllChanges