Enum RowLevelOperationMode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<RowLevelOperationMode>

    public enum RowLevelOperationMode
    extends java.lang.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.

    • Method Detail

      • values

        public static RowLevelOperationMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RowLevelOperationMode c : RowLevelOperationMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RowLevelOperationMode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • modeName

        public java.lang.String modeName()