ZENOTME commented on code in PR #1085:
URL: https://github.com/apache/iceberg-rust/pull/1085#discussion_r2002689031


##########
crates/iceberg/src/spec/snapshot_summary.rs:
##########
@@ -0,0 +1,747 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::collections::HashMap;
+
+use itertools::Itertools;
+
+use super::{DataContentType, DataFile, PartitionSpecRef};
+use crate::spec::{Operation, SchemaRef, Summary};
+use crate::{Error, ErrorKind, Result};
+
+const ADDED_DATA_FILES: &str = "added-data-files";
+const ADDED_DELETE_FILES: &str = "added-delete-files";
+const ADDED_EQUALITY_DELETES: &str = "added-equality-deletes";
+const ADDED_FILE_SIZE: &str = "added-files-size";
+const ADDED_POSITION_DELETES: &str = "added-position-deletes";
+const ADDED_POSITION_DELETE_FILES: &str = "added-position-delete-files";
+const ADDED_RECORDS: &str = "added-records";
+const DELETED_DATA_FILES: &str = "deleted-data-files";
+const DELETED_RECORDS: &str = "deleted-records";
+const ADDED_EQUALITY_DELETE_FILES: &str = "added-equality-delete-files";
+const REMOVED_DELETE_FILES: &str = "removed-delete-files";
+const REMOVED_EQUALITY_DELETES: &str = "removed-equality-deletes";
+const REMOVED_EQUALITY_DELETE_FILES: &str = "removed-equality-delete-files";
+const REMOVED_FILE_SIZE: &str = "removed-files-size";
+const REMOVED_POSITION_DELETES: &str = "removed-position-deletes";
+const REMOVED_POSITION_DELETE_FILES: &str = "removed-position-delete-files";
+const TOTAL_EQUALITY_DELETES: &str = "total-equality-deletes";
+const TOTAL_POSITION_DELETES: &str = "total-position-deletes";
+const TOTAL_DATA_FILES: &str = "total-data-files";
+const TOTAL_DELETE_FILES: &str = "total-delete-files";
+const TOTAL_RECORDS: &str = "total-records";
+const TOTAL_FILE_SIZE: &str = "total-files-size";
+const CHANGED_PARTITION_COUNT_PROP: &str = "changed-partition-count";
+const CHANGED_PARTITION_PREFIX: &str = "partitions.";
+
+#[derive(Default)]
+#[allow(dead_code)]
+pub(crate) struct SnapshotSummaryCollector {
+    metrics: UpdateMetrics,
+    partition_metrics: HashMap<String, UpdateMetrics>,
+    max_changed_partitions_for_summaries: u64,
+}
+
+#[allow(dead_code)]
+impl SnapshotSummaryCollector {

Review Comment:
   Looks like we should provide function like `set(string,string)` to let user 
set custom properities
   
https://github.com/apache/iceberg/blob/4dbcdfc85a64dc1d97d7434e353c7f9e4c18e1b3/core/src/main/java/org/apache/iceberg/SnapshotSummary.java#L152



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to