JonasJ-ap commented on code in PR #7450:
URL: https://github.com/apache/iceberg/pull/7450#discussion_r1179694860
##########
delta-lake/src/main/java/org/apache/iceberg/delta/BaseSnapshotDeltaLakeTableAction.java:
##########
@@ -412,6 +426,25 @@ private Map<String, String> destTableProperties(
return additionalPropertiesBuilder.build();
}
+ private void tagCurrentSnapshot(long deltaVersion, Transaction transaction) {
+ long currentSnapshotId =
transaction.table().currentSnapshot().snapshotId();
+
+ ManageSnapshots manageSnapshots = transaction.manageSnapshots();
+ manageSnapshots.createTag(DELTA_VERSION_TAG_PREFIX + deltaVersion,
currentSnapshotId);
+
+ Timestamp deltaVersionTimestamp =
deltaLog.getCommitInfoAt(deltaVersion).getTimestamp();
Review Comment:
Based on its source code, it seems this method returns non-null result:
https://github.com/delta-io/connectors/blob/f11c355649bf1182dd74b563bc399fa7f1b7fe97/standalone/src/main/scala/io/delta/standalone/internal/DeltaLogImpl.scala#L101-L104
https://github.com/delta-io/connectors/blob/f11c355649bf1182dd74b563bc399fa7f1b7fe97/standalone/src/main/scala/io/delta/standalone/internal/util/ConversionUtils.scala#L126-L159
So I think we are safe to exclude null-check for simplification. However,
given that the interface of this method does not specify it as `nonnull`, I am
not against adding a null check. What do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]