This is an automated email from the ASF dual-hosted git repository.

dweeks pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new c6d38e3575 Core: Deprecate functions in TableMetadata and DataWriter 
(#5772)
c6d38e3575 is described below

commit c6d38e35750724d3b6b8d318ea465561bec5fd4d
Author: gaborkaszab <[email protected]>
AuthorDate: Wed Sep 28 17:13:22 2022 +0200

    Core: Deprecate functions in TableMetadata and DataWriter (#5772)
---
 .../main/java/org/apache/iceberg/TableMetadata.java | 21 ---------------------
 .../main/java/org/apache/iceberg/io/DataWriter.java | 10 ----------
 .../org/apache/iceberg/io/TestWriterMetrics.java    |  8 ++++----
 3 files changed, 4 insertions(+), 35 deletions(-)

diff --git a/core/src/main/java/org/apache/iceberg/TableMetadata.java 
b/core/src/main/java/org/apache/iceberg/TableMetadata.java
index 0a566581ab..2f2671463e 100644
--- a/core/src/main/java/org/apache/iceberg/TableMetadata.java
+++ b/core/src/main/java/org/apache/iceberg/TableMetadata.java
@@ -1165,27 +1165,6 @@ public class TableMetadata implements Serializable {
       return this;
     }
 
-    /**
-     * Removes the given branch
-     *
-     * @deprecated will be removed in 0.15.0. Use removeRef instead.
-     */
-    @Deprecated
-    public Builder removeBranch(String branch) {
-      if (SnapshotRef.MAIN_BRANCH.equals(branch)) {
-        this.currentSnapshotId = -1;
-        snapshotLog.clear();
-      }
-
-      SnapshotRef ref = refs.remove(branch);
-      if (ref != null) {
-        ValidationException.check(ref.isBranch(), "Cannot remove branch: %s is 
a tag", branch);
-        changes.add(new MetadataUpdate.RemoveSnapshotRef(branch));
-      }
-
-      return this;
-    }
-
     public Builder setStatistics(long snapshotId, StatisticsFile 
statisticsFile) {
       Preconditions.checkNotNull(statisticsFile, "statisticsFile is null");
       Preconditions.checkArgument(
diff --git a/core/src/main/java/org/apache/iceberg/io/DataWriter.java 
b/core/src/main/java/org/apache/iceberg/io/DataWriter.java
index 35bdd13fe5..dfb372d3a8 100644
--- a/core/src/main/java/org/apache/iceberg/io/DataWriter.java
+++ b/core/src/main/java/org/apache/iceberg/io/DataWriter.java
@@ -71,16 +71,6 @@ public class DataWriter<T> implements FileWriter<T, 
DataWriteResult> {
     appender.add(row);
   }
 
-  /**
-   * Writes a data record.
-   *
-   * @deprecated since 0.13.0, will be removed in 0.14.0; use {@link 
#write(Object)} instead.
-   */
-  @Deprecated
-  public void add(T row) {
-    write(row);
-  }
-
   @Override
   public long length() {
     return appender.length();
diff --git a/data/src/test/java/org/apache/iceberg/io/TestWriterMetrics.java 
b/data/src/test/java/org/apache/iceberg/io/TestWriterMetrics.java
index b559b976af..219c37f208 100644
--- a/data/src/test/java/org/apache/iceberg/io/TestWriterMetrics.java
+++ b/data/src/test/java/org/apache/iceberg/io/TestWriterMetrics.java
@@ -227,10 +227,10 @@ public abstract class TestWriterMetrics<T> {
         OutputFileFactory.builderFor(maxColumnTable, 1, 
1).format(fileFormat).build();
 
     T row = toGenericRow(1, numColumns);
-    DataWriter dataWriter =
+    DataWriter<T> dataWriter =
         newWriterFactory(maxColumnTable)
             .newDataWriter(maxColFactory.newOutputFile(), 
PartitionSpec.unpartitioned(), null);
-    dataWriter.add(row);
+    dataWriter.write(row);
     dataWriter.close();
     DataFile dataFile = dataWriter.toDataFile();
 
@@ -287,10 +287,10 @@ public abstract class TestWriterMetrics<T> {
         OutputFileFactory.builderFor(maxColumnTable, 1, 
1).format(fileFormat).build();
 
     T row = toGenericRow(1, numColumns);
-    DataWriter dataWriter =
+    DataWriter<T> dataWriter =
         newWriterFactory(maxColumnTable)
             .newDataWriter(maxColFactory.newOutputFile(), 
PartitionSpec.unpartitioned(), null);
-    dataWriter.add(row);
+    dataWriter.write(row);
     dataWriter.close();
     DataFile dataFile = dataWriter.toDataFile();
 

Reply via email to