Package com.linkedin.venice.compute
Interface ReadComputeOperator
-
- All Known Implementing Classes:
CosineSimilarityOperator
,CountOperator
,DotProductOperator
,HadamardProductOperator
public interface ReadComputeOperator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
allowFieldValueToBeNull()
Whether the extracted value of the field in the read value record is allowed to be null.void
compute(ComputeOperation op, org.apache.avro.Schema.Field operatorField, org.apache.avro.Schema.Field resultField, org.apache.avro.generic.GenericRecord valueRecord, org.apache.avro.generic.GenericRecord resultRecord, java.util.Map<java.lang.String,java.lang.String> computationErrorMap, java.util.Map<java.lang.String,java.lang.Object> context)
java.lang.String
getOperatorFieldName(ComputeOperation op)
java.lang.String
getResultFieldName(ComputeOperation op)
default void
putDefaultResult(org.apache.avro.generic.GenericRecord record, org.apache.avro.Schema.Field field)
default void
putResult(org.apache.avro.generic.GenericRecord record, org.apache.avro.Schema.Field field, java.lang.Object result)
-
-
-
Method Detail
-
compute
void compute(ComputeOperation op, org.apache.avro.Schema.Field operatorField, org.apache.avro.Schema.Field resultField, org.apache.avro.generic.GenericRecord valueRecord, org.apache.avro.generic.GenericRecord resultRecord, java.util.Map<java.lang.String,java.lang.String> computationErrorMap, java.util.Map<java.lang.String,java.lang.Object> context)
-
putResult
default void putResult(org.apache.avro.generic.GenericRecord record, org.apache.avro.Schema.Field field, java.lang.Object result)
-
putDefaultResult
default void putDefaultResult(org.apache.avro.generic.GenericRecord record, org.apache.avro.Schema.Field field)
-
getResultFieldName
java.lang.String getResultFieldName(ComputeOperation op)
-
getOperatorFieldName
java.lang.String getOperatorFieldName(ComputeOperation op)
-
allowFieldValueToBeNull
boolean allowFieldValueToBeNull()
Whether the extracted value of the field in the read value record is allowed to be null.- Returns:
- True if the extracted value is nullable and vice versa
-
-