code: private void initBatch(
        MemoryMode memMode,
        StructType partitionColumns,
        InternalRow partitionValues) {
      StructType batchSchema = new StructType();
      for (StructField f: sparkSchema.fields()) {
        batchSchema = batchSchema.add(f);
      }
      if (partitionColumns != null) {
        for (StructField f : partitionColumns.fields()) {
          batchSchema = batchSchema.add(f);
        }
      }
  
      if (memMode == MemoryMode.OFF_HEAP) {
        columnVectors = OffHeapColumnVector.allocateColumns(capacity, batchSchema);
      } else {
        columnVectors = OnHeapColumnVector.allocateColumns(capacity, batchSchema);
      }
      columnarBatch = new ColumnarBatch(columnVectors);
      if (partitionColumns != null) {
        int partitionIdx = sparkSchema.fields().length;
        for (int i = 0; i < partitionColumns.fields().length; i++) {
          ColumnVectorUtils.populate(columnVectors[i + partitionIdx], partitionValues, i);
          columnVectors[i + partitionIdx].setIsConstant();
        }
      }
  
      // Initialize missing columns with nulls.
      for (int i = 0; i < missingColumns.length; i++) {
        if (missingColumns[i]) {
          columnVectors[i].putNulls(0, capacity);
          columnVectors[i].setIsConstant();
        }
      }
    }
docs: Column 3: partitionValues[1]