@Override void copy(int index) throws SQLException { mutator.setSafe(index, result.getBoolean(columnIndex) ? 1 : 0); if (result.wasNull()) { mutator.setNull(index); } }
if (pci.kuduColumn.isNullable()) { ((NullableBitVector.Mutator) pci.vv.getMutator()) .setSafe(rowIndex, result.getBoolean(pci.index) ? 1 : 0); } else { ((BitVector.Mutator) pci.vv.getMutator())
@Override public void readField(long recordsToReadInThisPass) { recordsReadInThisIteration = Math.min(pageReader.currentPageCount - pageReader.valuesRead, recordsToReadInThisPass - valuesReadInCurrentPass); int defLevel; for (int i = 0; i < recordsReadInThisIteration; i++){ defLevel = pageReader.definitionLevels.readInteger(); // if the value is defined if (defLevel == columnDescriptor.getMaxDefinitionLevel()){ valueVec.getMutator().setSafe(i + valuesReadInCurrentPass, pageReader.valueReader.readBoolean() ? 1 : 0 ); } // otherwise the value is skipped, because the bit vector indicating nullability is zero filled } }
bitVector.getMutator().setNull(index); } else { bitVector.getMutator().setSafe(index, value ? 1 : 0);
public void write(NullableBitHolder h) { mutator.setSafe(idx(), h); vector.getMutator().setValueCount(idx()+1); }
public void setSafe(int index, NullableBitHolder holder) { setType(index, MinorType.BIT); getBitVector().getMutator().setSafe(index, holder); }
public void writeBit(int value) { mutator.setSafe(idx(), 1, value); vector.getMutator().setValueCount(idx() + 1); }
public void write(BitHolder h) { mutator.setSafe(idx(), h); vector.getMutator().setValueCount(idx()+1); }
@Override public void writeField(Object value, int outboundIndex) { if (value != null) { vector.getMutator().setSafe(outboundIndex, (Boolean) value ? 1 : 0); } }
public void write(NullableBitHolder h) { mutator.setSafe(idx(), h); vector.getMutator().setValueCount(idx()+1); }
public void setSafe(int index, NullableBitHolder holder) { setType(index, MinorType.BIT); getBitVector().getMutator().setSafe(index, holder); }
@Override public void setSafeValue(ObjectInspector oi, Object hiveFieldValue, ValueVector outputVV, int outputIndex) { final boolean value = (boolean) ((BooleanObjectInspector)oi).getPrimitiveJavaObject(hiveFieldValue); ((NullableBitVector) outputVV).getMutator().setSafe(outputIndex, value ? 1 : 0); } }
public void writeBit(int value) { mutator.setSafe(idx(), 1, value); vector.getMutator().setValueCount(idx() + 1); }
public void write(BitHolder h) { mutator.setSafe(idx(), h); vector.getMutator().setValueCount(idx()+1); }