You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "singhpk234 (via GitHub)" <gi...@apache.org> on 2025/06/12 01:06:38 UTC
Re: [PR] Spark: Custom snapshot property from session configuration [iceberg]
singhpk234 commented on code in PR #12999:
URL: https://github.com/apache/iceberg/pull/12999#discussion_r2141330541
##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/SparkWriteConf.java:
##########
@@ -252,6 +253,17 @@ public long targetDeleteFileSize() {
public Map<String, String> extraSnapshotMetadata() {
Map<String, String> extraSnapshotMetadata = Maps.newHashMap();
+ // Check session configuration for properties with SNAPSHOT_PROPERTY_PREFIX
+ JavaConverters.mapAsJavaMap(sessionConf.getAll())
+ .forEach(
+ (key, value) -> {
+ if (key.startsWith(SparkSQLProperties.SNAPSHOT_PROPERTY_PREFIX)) {
+ extraSnapshotMetadata.put(
+ key.substring(SparkSQLProperties.SNAPSHOT_PROPERTY_PREFIX.length()), value);
Review Comment:
suggestion: can use use PropertyUtil for this https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/util/PropertyUtil.java#L161
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org