@Override public void deserialize(Block block, int index, NullableLongState state) { state.setNull(false); state.setLong(BIGINT.getLong(block, index)); } }
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)); } }
public static void combine(NullableLongState state, NullableLongState otherState) { if (!state.isNull()) { return; } state.setNull(false); state.setLong(otherState.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 input(@AggregationState NullableLongState state, @SqlType(StandardTypes.BIGINT) long value) { state.setLong(state.getLong() + value); state.setNull(false); }
@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 combine(NullableLongState state, NullableLongState otherState) { state.setNull(state.isNull() && otherState.isNull()); state.setLong(state.getLong() + otherState.getLong()); }
@InputFunction public static void sum(@AggregationState NullableLongState state, @SqlType(StandardTypes.BIGINT) long value) { state.setNull(false); state.setLong(BigintOperators.add(state.getLong(), value)); }
public static void input(Type type, NullableLongState state, Block block, int position) { state.setNull(false); if (block.isNull(position)) { state.setLong(state.getLong() + PRIME64); } else { state.setLong(state.getLong() + type.hash(block, position) * PRIME64); } }
@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); }
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 bitOr(@AggregationState NullableLongState state, @SqlType(StandardTypes.BIGINT) long value) { if (state.isNull()) { state.setLong(value); } else { state.setLong(state.getLong() | value); } state.setNull(false); }
@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())); }
@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()); } }
@CombineFunction public static void combine(@AggregationState NullableLongState state, @AggregationState NullableLongState scratchState) { state.setLong(state.getLong() + scratchState.getLong()); state.setNull(state.isNull() && scratchState.isNull()); }