@Override public void end() { entryConverter.afterValue(); if (builder == null) { nullBuilder.closeEntry(); } else { builder.closeEntry(); } }
@Override public void start() { if (builder == null) { if (nullBuilder == null || (nullBuilder.getPositionCount() >= NULL_BUILDER_POSITIONS_THRESHOLD && nullBuilder.getSizeInBytes() >= NULL_BUILDER_SIZE_IN_BYTES_THRESHOLD)) { nullBuilder = mapType.createBlockBuilder( new BlockBuilderStatus(), NULL_BUILDER_POSITIONS_THRESHOLD); } currentEntryBuilder = nullBuilder.beginBlockEntry(); } else { currentEntryBuilder = builder.beginBlockEntry(); } entryConverter.beforeValue(currentEntryBuilder); }