static void write(Type type, NullableLongState state, BlockBuilder out) { if (state.isNull()) { out.appendNull(); } else { type.writeLong(out, state.getLong()); } } }
@CombineFunction public static void combine(@AggregationState NullableLongState state, @AggregationState NullableLongState otherState) { if (state.isNull()) { state.setNull(otherState.isNull()); state.setLong(otherState.getLong()); } else if (!otherState.isNull()) { state.setLong(state.getLong() & otherState.getLong()); } }
@CombineFunction public static void combine(@AggregationState NullableLongState state, @AggregationState NullableLongState otherState) { if (state.isNull()) { state.setNull(otherState.isNull()); state.setLong(otherState.getLong()); } else if (!otherState.isNull()) { state.setLong(state.getLong() | otherState.getLong()); } }
public static void combine(NullableLongState state, NullableLongState otherState) { if (!state.isNull()) { return; } state.setNull(false); state.setLong(otherState.getLong()); }
public static void input(Type type, NullableLongState state, Block block, int position) { if (!state.isNull()) { return; } state.setNull(false); state.setLong(type.getLong(block, position)); }
private static void update(NullableLongState state, long size) { if (state.isNull()) { state.setNull(false); state.setLong(size); } else { state.setLong(max(state.getLong(), size)); } }
@Override public void serialize(NullableLongState state, BlockBuilder out) { if (state.isNull()) { out.appendNull(); } else { BIGINT.writeLong(out, state.getLong()); } }
public static void output(NullableLongState state, BlockBuilder out) { if (state.isNull()) { out.appendNull(); } else { VARBINARY.writeSlice(out, wrappedLongArray(state.getLong())); } } }
private static void update(NullableLongState state, long size) { if (state.isNull()) { state.setNull(false); state.setLong(size); } else { state.setLong(state.getLong() + size); } }
public static void input(NullableLongState state, Object value, long initialStateValue, BinaryFunctionInterface inputFunction, BinaryFunctionInterface combineFunction) { if (state.isNull()) { state.setNull(false); state.setLong(initialStateValue); } state.setLong((long) inputFunction.apply(state.getLong(), value)); }
@InputFunction public static void bitOr(@AggregationState NullableLongState state, @SqlType(StandardTypes.BIGINT) long value) { if (state.isNull()) { state.setLong(value); } else { state.setLong(state.getLong() | value); } state.setNull(false); }
public static void combine(NullableLongState state, NullableLongState otherState, BinaryFunctionInterface inputFunction, BinaryFunctionInterface combineFunction) { if (state.isNull()) { state.setNull(false); state.setLong(otherState.getLong()); return; } state.setLong((long) combineFunction.apply(state.getLong(), otherState.getLong())); }
@InputFunction public static void bitAnd(@AggregationState NullableLongState state, @SqlType(StandardTypes.BIGINT) long value) { if (state.isNull()) { state.setLong(value); } else { state.setLong(state.getLong() & value); } state.setNull(false); }
private static void compareAndUpdateState(MethodHandle methodHandle, NullableLongState state, long value) { if (state.isNull()) { state.setNull(false); state.setLong(value); return; } try { if ((boolean) methodHandle.invokeExact(value, state.getLong())) { state.setLong(value); } } catch (Throwable t) { throw internalError(t); } }
@CombineFunction public static void combine(NullableLongState state, NullableLongState otherState) { if (state.isNull()) { state.setNull(false); state.setLong(otherState.getLong()); return; } state.setLong(BigintOperators.add(state.getLong(), otherState.getLong())); }
@CombineFunction public static void combine(NullableLongState state, NullableLongState otherState) { if (state.isNull()) { state.setNull(false); state.setLong(otherState.getLong()); return; } state.setLong(BigintOperators.add(state.getLong(), otherState.getLong())); }
@CombineFunction public static void combine(@AggregationState NullableLongState state, @AggregationState NullableLongState otherState) { if (state.isNull()) { state.setNull(false); state.setLong(otherState.getLong()); return; } state.setLong(state.getLong() + otherState.getLong()); }
@CombineFunction public static void combine(@AggregationState NullableLongState state, @AggregationState NullableLongState otherState) { if (state.isNull()) { state.setNull(false); state.setLong(otherState.getLong()); return; } state.setLong(BigintOperators.add(state.getLong(), otherState.getLong())); }