rdblue commented on code in PR #4741:
URL: https://github.com/apache/iceberg/pull/4741#discussion_r895212708


##########
api/src/main/java/org/apache/iceberg/UpdateTableStatistics.java:
##########
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+package org.apache.iceberg;
+
+/**
+ * API for adding or removing statistics files from a table.
+ */
+public interface UpdateTableStatistics extends PendingUpdate<Snapshot> {
+  /**
+   * Delete a statistics file path from the underlying table.
+   * <p>
+   * To remove a statistics file from the table, this path must equal a path 
in the table's metadata. Paths
+   * that are different but equivalent will not be removed. For example, 
file:/path/file.avro is
+   * equivalent to file:///path/file.avro, but would not remove the latter 
path from the table.
+   *
+   * @param path a fully-qualified file path to remove from the table
+   * @return this for method chaining
+   */
+  UpdateTableStatistics deleteStatisticsFile(CharSequence path);

Review Comment:
   I think it would be fine for this to be `replaceStatistics` (and possibly 
validate the latest stats file has not changed) or `setStatistics`. I don't 
really see the issue that you raised in [the other 
thread](https://github.com/apache/iceberg/pull/4945#discussion_r894207600).
   
   Either way, a caller updating statistics will do some calculation on the 
table and write a statistics file. Whether that stats file is based on the last 
doesn't really affect this API.



-- 
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]

Reply via email to