Enum Class WriteComputeOperation
- All Implemented Interfaces:
Serializable
,Comparable<WriteComputeOperation>
,Constable
This enum describe the possible write compute operations Venice supports.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionPerform list operations on top of the original array.Perform map operations on top of the original map.Mark to ignore the field.Put a new value on an existing field. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic WriteComputeOperation
getFieldOperationType
(Object writeComputeFieldValue) getName()
static boolean
isPartialUpdateOp
(org.apache.avro.generic.GenericRecord writeComputeRecord) static WriteComputeOperation
Returns the enum constant of this class with the specified name.static WriteComputeOperation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
Put a new value on an existing field. It's used for "partial put". -
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
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
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getName
-
getFieldOperationType
-
isPartialUpdateOp
public static boolean isPartialUpdateOp(org.apache.avro.generic.GenericRecord writeComputeRecord)
-