private void testStructLong(TypeInfo type) throws HiveException {
    LongColumnVector icv = VectorizedRowGroupGenUtil.generateLongColumnVector(true, false,
        vectorSize, new Random(10));
    icv.isNull[3] = true;

    LongColumnVector bcv = VectorizedRowGroupGenUtil.generateLongColumnVector(true, false,
        vectorSize, new Random(10));
    bcv.isNull[2] = true;
    
    ArrayList<Object>[] values = (ArrayList<Object>[]) new ArrayList[this.vectorSize];
    
    StructObjectInspector soi = genStructOI();
    
    VectorExpressionWriter[] vew = VectorExpressionWriterFactory.getExpressionWriters(soi);
    
    for (int i = 0; i < vectorSize; i++) {
      values[i] = new ArrayList<Object>(2);
      values[i].add(null);
      values[i].add(null);

      vew[0].setValue(values[i], icv, i);
      vew[1].setValue(values[i], bcv, i);
      
      Object theInt = values[i].get(0);
      if (theInt == null) {
        Assert.assertTrue(icv.isNull[i]);
      } else {
        IntWritable w = (IntWritable) theInt;
        Assert.assertEquals((int) icv.vector[i], w.get());
      }

      Object theBool = values[i].get(1);
      if (theBool == null) {
        Assert.assertTrue(bcv.isNull[i]);
      } else {
        BooleanWritable w = (BooleanWritable) theBool;
        Assert.assertEquals(bcv.vector[i] == 0 ? false : true, w.get());
      }
    }
  }
Unit tests for vector expression writers.
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorExpressionWriters.java