Package com.linkedin.venice.compute
Class CosineSimilarityOperator
java.lang.Object
com.linkedin.venice.compute.CosineSimilarityOperator
- All Implemented Interfaces:
ReadComputeOperator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the extracted value of the field in the read value record is allowed to be null.voidcompute(ComputeOperation op, org.apache.avro.Schema.Field operatorInputField, org.apache.avro.Schema.Field resultField, org.apache.avro.generic.GenericRecord inputValueRecord, org.apache.avro.generic.GenericRecord resultRecord, Map<String, String> computationErrorMap, Map<String, Object> context) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.linkedin.venice.compute.ReadComputeOperator
putDefaultResult, putResult
-
Constructor Details
-
CosineSimilarityOperator
public CosineSimilarityOperator()
-
-
Method Details
-
compute
public void compute(ComputeOperation op, org.apache.avro.Schema.Field operatorInputField, org.apache.avro.Schema.Field resultField, org.apache.avro.generic.GenericRecord inputValueRecord, org.apache.avro.generic.GenericRecord resultRecord, Map<String, String> computationErrorMap, Map<String, Object> context) - Specified by:
computein interfaceReadComputeOperator
-
allowFieldValueToBeNull
public boolean allowFieldValueToBeNull()Description copied from interface:ReadComputeOperatorWhether the extracted value of the field in the read value record is allowed to be null.- Specified by:
allowFieldValueToBeNullin interfaceReadComputeOperator- Returns:
- True if the extracted value is nullable and vice versa
-
toString
-
getOperatorFieldName
- Specified by:
getOperatorFieldNamein interfaceReadComputeOperator
-
getResultFieldName
- Specified by:
getResultFieldNamein interfaceReadComputeOperator
-