code: public void setField(int fieldNum, Value value) {
  		// range check
  		if (fieldNum < 0) {
  			throw new IndexOutOfBoundsException();
  		}
  		
  		// if the field number is beyond the size, the tuple is expanded
  		if (fieldNum >= this.numFields) {
  			setNumFields(fieldNum + 1);
  		}
  		internallySetField(fieldNum, value);
  	}
docs: Sets the field at the given position to the given value. If the field position is larger or equal than
  the current number of fields in the record, than the record is expanded to host as many columns.
  <p>
  The value is kept as a reference in the record until the binary representation is synchronized. Until that
  point, all modifications to the value's object will change the value inside the record.
  <p>
  The binary representation is synchronized the latest when the record is emitted. It may be triggered
  manually at an earlier point, but it is generally not necessary and advisable. Because the synchronization
  triggers the serialization on all modified values, it may be an expensive operation.
  
  @param fieldNum The position of the field, starting at zero.
  @param value The new value.