/** * Sets the fields to <code>null</code> using the given bit mask. * The bits correspond to the individual columns: <code>(1 == nullify, 0 == keep)</code>. * * @param mask Bit mask, where the i-th least significant bit represents the i-th field in the record. */ public void setNull(long mask) { for (int i = 0; i < this.numFields; i++, mask >>>= 1) { if ((mask & 0x1) != 0) { internallySetField(i, null); } } }
/** * Sets the fields to <code>null</code> using the given bit mask. * The bits correspond to the individual columns: <code>(1 == nullify, 0 == keep)</code>. * * @param mask Bit mask, where the i-th least significant bit represents the i-th field in the record. */ public void setNull(long mask) { for (int i = 0; i < this.numFields; i++, mask >>>= 1) { if ((mask & 0x1) != 0) { internallySetField(i, null); } } }
/** * Sets the fields to <code>null</code> using the given bit mask. * The bits correspond to the individual columns: <code>(1 == nullify, 0 == keep)</code>. * * @param mask Bit mask, where the i-th least significant bit in the n-th bit mask represents the * <code>(n*64) + i</code>-th field in the record. */ public void setNull(long[] mask) { for (int maskPos = 0, i = 0; i < this.numFields;) { long currMask = mask[maskPos]; for (int k = 64; i < this.numFields && k > 0; --k, i++, currMask >>>= 1) { if ((currMask & 0x1) != 0) { internallySetField(i, null); } } } }
/** * Sets the fields to <code>null</code> using the given bit mask. * The bits correspond to the individual columns: <code>(1 == nullify, 0 == keep)</code>. * * @param mask Bit mask, where the i-th least significant bit in the n-th bit mask represents the * <code>(n*64) + i</code>-th field in the record. */ public void setNull(long[] mask) { for (int maskPos = 0, i = 0; i < this.numFields;) { long currMask = mask[maskPos]; for (int k = 64; i < this.numFields && k > 0; --k, i++, currMask >>>= 1) { if ((currMask & 0x1) != 0) { internallySetField(i, null); } } } }
/** * Sets the field at the given position to <code>null</code>. * * @param field The field index. * @throws IndexOutOfBoundsException Thrown, when the position is not between 0 (inclusive) and the * number of fields (exclusive). */ public void setNull(int field) { // range check if (field < 0 || field >= this.numFields) { throw new IndexOutOfBoundsException(); } internallySetField(field, null); }
/** * Sets the field at the given position to <code>null</code>. * * @param field The field index. * @throws IndexOutOfBoundsException Thrown, when the position is not between 0 (inclusive) and the * number of fields (exclusive). */ public void setNull(int field) { // range check if (field < 0 || field >= this.numFields) { throw new IndexOutOfBoundsException(); } internallySetField(field, null); }
/** * @param value */ public void addField(Value value) { final int num = this.numFields; setNumFields(num + 1); internallySetField(num, value); }
/** * @param value */ public void addField(Value value) { final int num = this.numFields; setNumFields(num + 1); internallySetField(num, value); }
/** * 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. */ 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); }
/** * 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. */ 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); }
internallySetField(targetFieldNum, null); final int targetFieldNum = targetPositions[i]; targetLengths[targetFieldNum] = sourceLengths[sourceFieldNum]; internallySetField(targetFieldNum, RESERVE_SPACE); internallySetField(targetFieldNum, sourceFields[sourceFieldNum]); } else if (sourceOffset != NULL_INDICATOR_OFFSET) {
internallySetField(targetFieldNum, null); final int targetFieldNum = targetPositions[i]; targetLengths[targetFieldNum] = sourceLengths[sourceFieldNum]; internallySetField(targetFieldNum, RESERVE_SPACE); internallySetField(targetFieldNum, sourceFields[sourceFieldNum]); } else if (sourceOffset != NULL_INDICATOR_OFFSET) {