Enum Class WriteComputeOperation

java.lang.Object
java.lang.Enum<WriteComputeOperation>
com.linkedin.venice.schema.writecompute.WriteComputeOperation
All Implemented Interfaces:
Serializable, Comparable<WriteComputeOperation>, Constable

public enum WriteComputeOperation extends Enum<WriteComputeOperation>
This enum describe the possible write compute operations Venice supports.
  • Enum Constant Details

    • NO_OP_ON_FIELD

      public static final WriteComputeOperation NO_OP_ON_FIELD
      Mark to ignore the field. It's used for "partial put" and can be applied to any kind of schema. It's also the default for all record fields in the write compute schema.
    • PUT_NEW_FIELD

      public static final WriteComputeOperation PUT_NEW_FIELD
      Put a new value on an existing field. It's used for "partial put".
    • LIST_OPS

      public static final WriteComputeOperation LIST_OPS
      Perform list operations on top of the original array. It can be only applied to Avro array. Currently support: 1. setUnion: add elements into the original array, as if it was a sorted set. (e.g.: duplicates will be pruned.) 2. setDiff: remove elements from the original array, as if it was a sorted set.
    • MAP_OPS

      public static final WriteComputeOperation MAP_OPS
      Perform map operations on top of the original map. It can be only applied to Avro map. Currently support: 1. mapUnion: add new entries into the original map. It overrides the value if a key has already existed in the map. 2. mapDiff: remove entries from the original array.
  • Field Details

    • name

      public final String name
  • Method Details

    • values

      public static WriteComputeOperation[] 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 WriteComputeOperation 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
    • getName

      public String getName()
    • getFieldOperationType

      public static WriteComputeOperation getFieldOperationType(Object writeComputeFieldValue)
    • isPartialUpdateOp

      public static boolean isPartialUpdateOp(org.apache.avro.generic.GenericRecord writeComputeRecord)