static AtopColumnParser bigintParser(int index) { return ((fields, type, builder, session) -> type.writeLong(builder, Long.valueOf(fields.get(index)))); } }
@Override public void decodeValueInto(BlockBuilder builder, Slice slice, int offset, int length) { type.writeLong(builder, readVInt(slice, offset, length)); } }
@Override public void decodeValueInto(int depth, BlockBuilder builder, Slice slice, int offset, int length) throws RcFileCorruptionException { type.writeLong(builder, Float.floatToIntBits(parseFloat(slice, offset, length))); }
@Override public void decodeValueInto(int depth, BlockBuilder builder, Slice slice, int offset, int length) { long millis = parseTimestamp(slice, offset, length); type.writeLong(builder, millis); }
@Override public void decodeValueInto(int depth, BlockBuilder builder, Slice slice, int offset, int length) { type.writeLong(builder, parseDate(slice, offset, length)); }
public void nextVector(Type type, long items, BlockBuilder builder) throws IOException { for (int i = 0; i < items; i++) { type.writeLong(builder, next()); } } }
public void nextVector(Type type, int items, BlockBuilder builder) throws IOException { for (int i = 0; i < items; i++) { type.writeLong(builder, floatToRawIntBits(next())); } } }
@Override public void decodeValueInto(BlockBuilder builder, Slice slice, int offset, int length) { long daysSinceEpoch = readVInt(slice, offset, length); type.writeLong(builder, daysSinceEpoch); } }
@Override public void decodeValueInto(BlockBuilder builder, Slice slice, int offset, int length) { type.writeLong(builder, slice.getByte(offset)); } }
@Override public void decodeValueInto(int depth, BlockBuilder builder, Slice slice, int offset, int length) { type.writeLong(builder, parseLong(slice, offset, length)); }
@Override public void decodeValueInto(BlockBuilder builder, Slice slice, int offset, int length) { long millis = getTimestamp(slice, offset); type.writeLong(builder, millis); }
default void nextLongVector(Type type, int items, BlockBuilder builder) throws IOException { for (int i = 0; i < items; i++) { type.writeLong(builder, next()); } }
@Override public void decodeValueInto(BlockBuilder builder, Slice slice, int offset, int length) { type.writeLong(builder, Short.reverseBytes(slice.getShort(offset))); } }
static void write(Type type, NullableLongState state, BlockBuilder out) { if (state.isNull()) { out.appendNull(); } else { type.writeLong(out, state.getLong()); } } }
public static void providedBlockLong(Type type, BlockBuilder output, Long value) { hitProvidedBlockBuilderLong.incrementAndGet(); if (value == null) { output.appendNull(); } else { type.writeLong(output, value); } }
@Override protected void readValue(BlockBuilder blockBuilder, Type type) { if (definitionLevel == columnDescriptor.getMaxDefinitionLevel()) { type.writeLong(blockBuilder, valuesReader.readInteger()); } else if (isValueNull()) { blockBuilder.appendNull(); } }
@Override protected void readValue(BlockBuilder blockBuilder, Type type) { if (definitionLevel == columnDescriptor.getMaxDefinitionLevel()) { type.writeLong(blockBuilder, valuesReader.readLong()); } else if (isValueNull()) { blockBuilder.appendNull(); } }
@Override protected void readValue(BlockBuilder blockBuilder, Type type) { if (definitionLevel == columnDescriptor.getMaxDefinitionLevel()) { Binary binary = valuesReader.readBytes(); type.writeLong(blockBuilder, getTimestampMillis(binary)); } else if (isValueNull()) { blockBuilder.appendNull(); } }
@UsedByGeneratedCode public static Block appendElement(Type elementType, Block block, long value) { BlockBuilder blockBuilder = elementType.createBlockBuilder(null, block.getPositionCount() + 1); for (int i = 0; i < block.getPositionCount(); i++) { elementType.appendTo(block, i, blockBuilder); } elementType.writeLong(blockBuilder, value); return blockBuilder.build(); }
@UsedByGeneratedCode public static Block prependElement(Type elementType, long value, Block block) { BlockBuilder blockBuilder = elementType.createBlockBuilder(null, block.getPositionCount() + 1); elementType.writeLong(blockBuilder, value); for (int i = 0; i < block.getPositionCount(); i++) { elementType.appendTo(block, i, blockBuilder); } return blockBuilder.build(); }