Enum Class RowLevelOperationMode

java.lang.Object
java.lang.Enum<RowLevelOperationMode>
org.apache.iceberg.RowLevelOperationMode
All Implemented Interfaces:
Serializable, Comparable<RowLevelOperationMode>, Constable

public enum RowLevelOperationMode extends Enum<RowLevelOperationMode>
Iceberg supports two ways to modify records in a table: copy-on-write and merge-on-read.

In copy-on-write, changes are materialized immediately and matching data files are replaced with new data files that represent the new table state. For example, if there is a record that has to be deleted, the data file that contains this record has to be replaced with another data file without that record. All unchanged rows have to be copied over to the new data file.

In merge-on-read, changes aren't materialized immediately. Instead, IDs of deleted and updated records are written into delete files that are applied during reads and updated/inserted records are written into new data files that are committed together with the delete files.

Copy-on-write changes tend to consume more time and resources during writes but don't introduce any performance overhead during reads. Merge-on-read operations, on the other hand, tend to be much faster during writes but require more time and resources to apply delete files during reads.

  • Enum Constant Details

  • Method Details

    • values

      public static RowLevelOperationMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RowLevelOperationMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromName

      public static RowLevelOperationMode fromName(String modeName)
    • modeName

      public String modeName()