public static void verifyLongNullDataVectorEntries(
      LongColumnVector v, int[] sel, boolean selectedInUse, int n) {
    if (n == 0 || v.noNulls) {
      return;
    } else if (v.isRepeating) {
      if (v.isNull[0]) {
        assertEquals(LongColumnVector.NULL_VALUE, v.vector[0]);
      }
    } else if (selectedInUse) {
      for (int j = 0; j != n; j++) {
        int i = sel[j];
        if (v.isNull[i]) {
          assertEquals(LongColumnVector.NULL_VALUE, v.vector[i]);
        }
      }
    } else {
      for (int i = 0; i != n; i++) {
        if (v.isNull[i]) {
          assertEquals(LongColumnVector.NULL_VALUE, v.vector[i]);
        }
      }
    }
  }
Unit tests for vectorized arithmetic expressions.
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorArithmeticExpressions.java