-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4980784
commit 95a98b0
Showing
7 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
--- | ||
title: SchemaUtils | ||
--- | ||
|
||
# SchemaUtils Utility | ||
|
||
## <span id="mergeSchemas"> mergeSchemas | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# RemoveColumnMappingCommand | ||
|
||
`RemoveColumnMappingCommand` is a [ImplicitMetadataOperation](../../ImplicitMetadataOperation.md) to remove [column mapping](../../column-mapping/index.md) from a [delta table](#deltaLog). | ||
|
||
`RemoveColumnMappingCommand` is used for [AlterTableSetPropertiesDeltaCommand](AlterTableSetPropertiesDeltaCommand.md) and [AlterTableUnsetPropertiesDeltaCommand](AlterTableUnsetPropertiesDeltaCommand.md) commands to exit early when executed with just the [delta.columnMapping.mode](../../table-properties/DeltaConfigs.md#COLUMN_MAPPING_MODE) table property being changed to `none` (and [spark.databricks.delta.columnMapping.allowRemoval](../../configuration-properties/index.md#columnMapping.allowRemoval) enabled). | ||
|
||
`RemoveColumnMappingCommand` is a transactional command (that [starts a new transaction](../../DeltaLog.md#withNewTransaction) on the [delta table](#deltaLog) when [executed](#run)). | ||
|
||
## Creating Instance | ||
|
||
`RemoveColumnMappingCommand` takes the following to be created: | ||
|
||
* <span id="deltaLog"> [DeltaLog](../../DeltaLog.md) | ||
* <span id="catalogOpt"> `CatalogTable` ([Spark SQL]({{ book.spark_sql }}/CatalogTable)) | ||
|
||
`RemoveColumnMappingCommand` is created using [apply](#apply) utility. | ||
|
||
## Creating RemoveColumnMappingCommand { #apply } | ||
|
||
```scala | ||
apply( | ||
deltaLog: DeltaLog, | ||
catalogOpt: Option[CatalogTable]): RemoveColumnMappingCommand | ||
``` | ||
|
||
`apply` creates a [RemoveColumnMappingCommand](#creating-instance) for the given [DeltaLog](../../DeltaLog.md) and `CatalogTable`. | ||
|
||
--- | ||
|
||
`apply` is used when: | ||
|
||
* [AlterTableSetPropertiesDeltaCommand](AlterTableSetPropertiesDeltaCommand.md) is executed | ||
* [AlterTableUnsetPropertiesDeltaCommand](AlterTableUnsetPropertiesDeltaCommand.md) is executed | ||
|
||
## Executing Command { #run } | ||
|
||
```scala | ||
run( | ||
spark: SparkSession, | ||
removeColumnMappingTableProperty: Boolean): Unit | ||
``` | ||
|
||
`run`...FIXME | ||
|
||
--- | ||
|
||
`run` is used when: | ||
|
||
* [AlterTableSetPropertiesDeltaCommand](AlterTableSetPropertiesDeltaCommand.md) is executed | ||
* [AlterTableUnsetPropertiesDeltaCommand](AlterTableUnsetPropertiesDeltaCommand.md) is executed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters