public DeferredObject getDeferredJavaObject(int row, VectorizedRowBatch b, int argPosition,
      VectorExpressionWriter[] writers) {

    if (isConstant()) {
      return this.constObjVal;
    } else {

      // get column
      ColumnVector cv = b.cols[columnNum];

      // write value to object that can be inspected
      Object o;
      try {
        o = writers[argPosition].writeValue(cv, row);
        return new GenericUDF.DeferredJavaObject(o);
      } catch (HiveException e) {
        throw new RuntimeException("Unable to get Java object from VectorizedRowBatch", e);
      }
    }
  }
Set this argument to be a "variable" one which is to be taken from
a specified column vector number i.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/udf/VectorUDFArgDesc.java