public StructType nextStruct(
      ColumnVector vector, int row, StructTypeInfo schema, Object previous) {
    if (vector.isRepeating) {
      row = 0;
    }
    if (vector.noNulls || !vector.isNull[row]) {
      List<TypeInfo> childrenTypes = schema.getAllStructFieldTypeInfos();
      StructType result = createStructObject(previous, childrenTypes);
      StructColumnVector struct = (StructColumnVector) vector;
      for (int f = 0; f < childrenTypes.size(); ++f) {
        setStructCol(result, f, nextValue(struct.fields[f], row,
            childrenTypes.get(f), getStructCol(result, f)));
      }
      return result;
    } else {
      return null;
    }
  }
If the current batch is empty, get a new one.
@return true if we have rows available.
ql/src/java/org/apache/hadoop/hive/ql/io/BatchToRowReader.java