code: func New(fields []*types.FieldType, cap, maxChunkSize int) *Chunk {
  	chk := new(Chunk)
  	chk.columns = make([]*column, 0, len(fields))
  	chk.capacity = mathutil.Min(cap, maxChunkSize)
  	for _, f := range fields {
  		elemLen := getFixedLen(f)
  		if elemLen == varElemLen {
  			chk.columns = append(chk.columns, newVarLenColumn(chk.capacity, nil))
  		} else {
  			chk.columns = append(chk.columns, newFixedLenColumn(elemLen, chk.capacity))
  		}
  	}
  	chk.numVirtualRows = 0
  
  	// set the default value of requiredRows to maxChunkSize to let chk.IsFull() behave
  	// like how we judge whether a chunk is full now, then the statement
  	// "chk.NumRows() < maxChunkSize"
  	// is equal to
  	// "!chk.IsFull()".
  	chk.requiredRows = maxChunkSize
  	return chk
  }
docs: // New creates a new chunk.
  //  cap: the limit for the max number of rows.
  //  maxChunkSize: the max limit for the number of rows.