@Override
  public void evaluate(VectorizedRowBatch batch) throws HiveException {
    if (childExpressions != null) {
      this.evaluateChildren(batch);
    }

    ColumnVector inputColVector1 = batch.cols[inputColumnNum[0]];
    ColumnVector inputColVector2 = batch.cols[inputColumnNum[1]];
    LongColumnVector outputColVector = (LongColumnVector) batch.cols[outputColumnNum];

    int[] sel = batch.selected;
    boolean[] inputIsNull1 = inputColVector1.isNull;
    boolean[] inputIsNull2 = inputColVector2.isNull;

    boolean[] outputIsNull = outputColVector.isNull;
    int n = batch.size;

    // return immediately if batch is empty
    if (n == 0) {
      return;
    }

    // We do not need to do a column reset since we are carefully changing the output.
    outputColVector.isRepeating = false;

    ByteBuffer buffer = ByteBuffer.allocate(8);

    if (inputColVector1.isRepeating && inputColVector2.isRepeating) {
      outputIsNull[0] = false; // output of hash will never be null

      // if any of the first element is not null, calculate hash
      if ((inputColVector1.noNulls || !inputIsNull1[0])
          || (inputColVector2.noNulls || !inputIsNull2[0])) {
        hash(inputColVector1, inputColVector2, outputColVector, 0, buffer);
      } else { // otherwise, hash is 0
        outputColVector.vector[0] = 0;
      }
      outputColVector.isRepeating = true;
      return;
    }

    if (batch.selectedInUse) {
      for (int j = 0; j != n; j++) {
        hash(inputColVector1, inputColVector2, outputColVector, sel[j], buffer);
      }
    } else {
      for (int i = 0; i != n; i++) {
        hash(inputColVector1, inputColVector2, outputColVector, i, buffer);
      }
    }
  }
Base class for vectorized implementation of GenericUDFMurmurHash. See subclasses for int/string
parameter variations.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/MurmurHashExpression.java