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())); }
@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())); }
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()); } }
private static void update(NullableLongState state, long size) { if (state.isNull()) { state.setNull(false); state.setLong(size); } else { state.setLong(max(state.getLong(), size)); } }
public static void combine(NullableLongState state, NullableLongState otherState) { if (!state.isNull()) { return; } state.setNull(false); state.setLong(otherState.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); } }
@InputFunction public static void sum(NullableLongState state, @SqlType(INTERVAL_DAY_TO_SECOND) long value) { state.setNull(false); state.setLong(BigintOperators.add(state.getLong(), value)); }
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 input(@AggregationState NullableLongState state, @SqlType(StandardTypes.BIGINT) long value) { state.setLong(state.getLong() + value); state.setNull(false); }
@InputFunction public static void sum(@AggregationState NullableLongState state, @SqlType(StandardTypes.BIGINT) long value) { state.setNull(false); state.setLong(BigintOperators.add(state.getLong(), value)); }
@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); }
@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); }