nssalian commented on code in PR #17016:
URL: https://github.com/apache/iceberg/pull/17016#discussion_r3564954110
##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/SparkWriteConf.java:
##########
@@ -272,13 +274,15 @@ public long targetDeleteFileSize() {
public Map<String, String> extraSnapshotMetadata() {
Map<String, String> extraSnapshotMetadata = Maps.newHashMap();
- writeOptions.forEach(
- (key, value) -> {
- if (key.startsWith(SnapshotSummary.EXTRA_METADATA_PREFIX)) {
- extraSnapshotMetadata.put(
- key.substring(SnapshotSummary.EXTRA_METADATA_PREFIX.length()),
value);
- }
- });
+ // Add session configuration properties with SNAPSHOT_PROPERTY_PREFIX if
necessary
+ extraSnapshotMetadata.putAll(
Review Comment:
This v3.5 rewrite of `extraSnapshotMetadata()` also changes the normal write
path - v3.5 INSERT/overwrite now honor `spark.sql.iceberg.snapshot-property.*`
session
config, which they previously ignored.
I looked into v4.0/v4.1 and that has
`testExtraSnapshotMetadataReflectsSessionConfig`,
`testExtraSnapshotMetadataWriteOptionsOverrideSessionConfig`,
and `testExtraSnapshotMetadataPersistedOnWrite` for this. Could you port
those three into v3.5 to cover the write-path change (especially
write-option-overrides-session precedence)?
--
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]