private void writeNullForMissingFields(final int to) { final int from = currentIndex[currentLevel]; for (; currentIndex[currentLevel] <= to; ++currentIndex[currentLevel]) { try { ColumnIO undefinedField = ((GroupColumnIO) currentColumnIO).getChild(currentIndex[currentLevel]); int d = currentColumnIO.getDefinitionLevel(); if (DEBUG) log( Arrays.toString(undefinedField.getFieldPath()) + ".writeNull(" + r[currentLevel] + "," + d + ")"); undefinedField.writeNull(r[currentLevel], d); } catch (RuntimeException e) { throw new RuntimeException( "error while writing nulls from " + from + " to " + to + ". current index: " + currentIndex[currentLevel], e); } } }
@Override public void addDouble(double value) { if (DEBUG) log("addDouble(" + value + ")"); ((PrimitiveColumnIO) currentColumnIO) .getColumnWriter() .write(value, r[currentLevel], currentColumnIO.getDefinitionLevel()); setRepetitionLevel(); if (DEBUG) printState(); }