Skip to content

Commit 680356d

Browse files
TransactionalWrite.writeFiles
1 parent 6ec9b47 commit 680356d

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

docs/TransactionalWrite.md

+15-6
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,13 @@ writeFiles(
103103

104104
`writeFiles` is used when:
105105

106-
* `WriteIntoDelta` is requested to [write](commands/WriteIntoDelta.md#write)
106+
* `WriteIntoDelta` is requested to [writeAndReturnCommitData](commands/WriteIntoDelta.md#writeAndReturnCommitData)
107107
* `DeleteCommand` is requested to [rewriteFiles](commands/delete/DeleteCommand.md#rewriteFiles)
108-
* `MergeIntoCommand` is requested to [writeInsertsOnlyWhenNoMatchedClauses](commands/merge/MergeIntoCommand.md#writeInsertsOnlyWhenNoMatchedClauses) and [writeAllChanges](commands/merge/MergeIntoCommand.md#writeAllChanges)
109-
* `OptimizeExecutor` is requested to [runOptimizeBinJob](commands/optimize/OptimizeExecutor.md#runOptimizeBinJob)
108+
* `MergeIntoCommandBase` is requested to [writeFiles](commands/merge/MergeIntoCommandBase.md#writeFiles)
110109
* `UpdateCommand` is requested to [rewriteFiles](commands/update/UpdateCommand.md#rewriteFiles)
110+
* `WriteIntoDelta` is requested to [writeAndReturnCommitData](commands/WriteIntoDelta.md#writeAndReturnCommitData), [writeFiles](commands/WriteIntoDelta.md#writeFiles)
111111
* `DeltaSink` is requested to [add a streaming micro-batch](spark-connector/DeltaSink.md#addBatch)
112+
* `OptimizeExecutor` is requested to [runOptimizeBinJob](commands/optimize/OptimizeExecutor.md#runOptimizeBinJob)
112113
* `RemoveColumnMappingCommand` is requested to [write data out](commands/alter/RemoveColumnMappingCommand.md#writeData)
113114

114115
---
@@ -212,7 +213,7 @@ Option | Value
212213
-|-
213214
[writePartitionColumns](spark-connector/DeltaOptions.md#WRITE_PARTITION_COLUMNS) | [isAnyEnabled](uniform/IcebergCompat.md#isAnyEnabled)
214215

215-
### Step 6.6 FileFormatWriter { #writeFiles-FileFormatWriter }
216+
### Step 6.6 DeltaFileFormatWriter { #writeFiles-DeltaFileFormatWriter }
216217

217218
As the very last step within the scope of the [new execution ID](#writeFiles-deltaTransactionalWrite), `writeFiles` [writes out the data](DeltaFileFormatWriter.md#write).
218219

@@ -223,9 +224,17 @@ As the very last step within the scope of the [new execution ID](#writeFiles-del
223224
* No bucketing
224225
* [DeltaJobStatisticsTracker](#writeFiles-optionalStatsTracker) and [BasicWriteJobStatsTracker](#writeFiles-statsTrackers)
225226

226-
### Step 7. AddFiles and AddCDCFiles { #writeFiles-FileActions }
227+
### Step 7. Collect AddFiles and AddCDCFiles { #writeFiles-FileActions }
228+
229+
`writeFiles` requests the [DelayedCommitProtocol](#getCommitter) for the [AddFiles](DelayedCommitProtocol.md#addedStatuses).
230+
231+
With a [DeltaJobStatisticsTracker](#writeFiles-optionalStatsTracker), `writeFiles` adds the [recordedStats](DeltaJobStatisticsTracker.md#recordedStats) to every [AddFile](DelayedCommitProtocol.md#addedStatuses) (by [path](FileAction.md#toPath)).
232+
233+
With [Iceberg Compatibility V2 enabled](uniform/IcebergCompatV2.md#isEnabled), `writeFiles` adds `ICEBERG_COMPAT_VERSION` tag with the value of `2` to every [AddFile](DelayedCommitProtocol.md#addedStatuses).
234+
235+
With at least one [AddFile](DelayedCommitProtocol.md#addedStatuses) and the given `isOptimize` flag disabled, `writeFiles` [registers](OptimisticTransactionImpl.md#registerPostCommitHook) the [AutoCompact](auto-compaction/AutoCompact.md) post-commit hook.
227236

228-
In the end, `writeFiles` returns [AddFile](AddFile.md)s and [AddCDCFile](AddCDCFile.md)s (from the [DelayedCommitProtocol](#writeFiles-committer)).
237+
In the end, `writeFiles` returns the [AddFile](AddFile.md)s and [AddCDCFile](AddCDCFile.md)s (from the [DelayedCommitProtocol](#writeFiles-committer)).
229238

230239
### getOptionalStatsTrackerAndStatsCollection { #getOptionalStatsTrackerAndStatsCollection }
231240

docs/uniform/IcebergCompatV2.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# IcebergCompatV2
2+
3+
`IcebergCompatV2` is...FIXME

0 commit comments

Comments
 (0)