RemoveColumnMappingCommand¶
RemoveColumnMappingCommand is a ImplicitMetadataOperation to remove column mapping from a delta table.
RemoveColumnMappingCommand is used for AlterTableSetPropertiesDeltaCommand and AlterTableUnsetPropertiesDeltaCommand commands to exit early when executed with just the delta.columnMapping.mode table property being changed to none (and spark.databricks.delta.columnMapping.allowRemoval enabled).
RemoveColumnMappingCommand is a transactional command (that starts a new transaction on the delta table when executed).
Creating Instance¶
RemoveColumnMappingCommand takes the following to be created:
RemoveColumnMappingCommand is created using apply utility.
Creating RemoveColumnMappingCommand¶
apply(
deltaLog: DeltaLog,
catalogOpt: Option[CatalogTable]): RemoveColumnMappingCommand
apply creates a RemoveColumnMappingCommand for the given DeltaLog and CatalogTable.
apply is used when:
- AlterTableSetPropertiesDeltaCommand is executed
- AlterTableUnsetPropertiesDeltaCommand is executed
Executing Command¶
run(
spark: SparkSession,
removeColumnMappingTableProperty: Boolean): Unit
run requests the DeltaLog to start a new transaction.
run...FIXME
run is used when:
- AlterTableSetPropertiesDeltaCommand is executed
- AlterTableUnsetPropertiesDeltaCommand is executed