@@ -139,8 +139,6 @@ trait RecordChecksum extends DeltaLogging {
139
139
* @param deltaLog The DeltaLog
140
140
* @param versionToCompute The version for which we want to compute the checksum
141
141
* @param actions The actions corresponding to the version `versionToCompute`
142
- * @param metadata The metadata corresponding to the version `versionToCompute`
143
- * @param protocol The protocol corresponding to the version `versionToCompute`
144
142
* @param operationName The operation name corresponding to the version `versionToCompute`
145
143
* @param txnIdOpt The transaction identifier for the version `versionToCompute`
146
144
* @param previousVersionState Contains either the versionChecksum corresponding to
@@ -156,8 +154,6 @@ trait RecordChecksum extends DeltaLogging {
156
154
deltaLog : DeltaLog ,
157
155
versionToCompute : Long ,
158
156
actions : Seq [Action ],
159
- metadata : Metadata ,
160
- protocol : Protocol ,
161
157
operationName : String ,
162
158
txnIdOpt : Option [String ],
163
159
previousVersionState : Either [Snapshot , VersionChecksum ],
@@ -213,6 +209,10 @@ trait RecordChecksum extends DeltaLogging {
213
209
// Incrementally compute the new version checksum, if the old one is available.
214
210
val ignoreAddFilesInOperation =
215
211
RecordChecksum .operationNamesWhereAddFilesIgnoredForIncrementalCrc.contains(operationName)
212
+ val protocol =
213
+ actions.collectFirst { case p : Protocol => p }.getOrElse(oldVersionChecksum.protocol)
214
+ val metadata =
215
+ actions.collectFirst { case m : Metadata => m }.getOrElse(oldVersionChecksum.metadata)
216
216
val persistentDVsOnTableReadable =
217
217
DeletionVectorUtils .deletionVectorsReadable(protocol, metadata)
218
218
val persistentDVsOnTableWritable =
0 commit comments