public static void combine(MethodHandle methodHandle, NullableBooleanState state, NullableBooleanState otherState) { compareAndUpdateState(methodHandle, state, otherState.getBoolean()); }
public static void combine(NullableBooleanState state, NullableBooleanState otherState, BinaryFunctionInterface inputFunction, BinaryFunctionInterface combineFunction) { if (state.isNull()) { state.setNull(false); state.setBoolean(otherState.getBoolean()); return; } state.setBoolean((boolean) combineFunction.apply(state.getBoolean(), otherState.getBoolean())); } }
public static void combine(NullableBooleanState state, NullableBooleanState otherState) { if (!state.isNull()) { return; } state.setNull(false); state.setBoolean(otherState.getBoolean()); }
@Override public void serialize(NullableBooleanState state, BlockBuilder out) { if (state.isNull()) { out.appendNull(); } else { BOOLEAN.writeBoolean(out, state.getBoolean()); } }
static void write(Type type, NullableBooleanState state, BlockBuilder out) { if (state.isNull()) { out.appendNull(); } else { type.writeBoolean(out, state.getBoolean()); } } }
public static void input(NullableBooleanState state, Object value, boolean initialStateValue, BinaryFunctionInterface inputFunction, BinaryFunctionInterface combineFunction) { if (state.isNull()) { state.setNull(false); state.setBoolean(initialStateValue); } state.setBoolean((boolean) inputFunction.apply(state.getBoolean(), value)); }
private static void compareAndUpdateState(MethodHandle methodHandle, NullableBooleanState state, boolean value) { if (state.isNull()) { state.setNull(false); state.setBoolean(value); return; } try { if ((boolean) methodHandle.invokeExact(value, state.getBoolean())) { state.setBoolean(value); } } catch (Throwable t) { throw internalError(t); } } }
@Override public void serialize(NullableBooleanState state, BlockBuilder out) { if (state.isNull()) { out.appendNull(); } else { BOOLEAN.writeBoolean(out, state.getBoolean()); } }
static void write(Type type, NullableBooleanState state, BlockBuilder out) { if (state.isNull()) { out.appendNull(); } else { type.writeBoolean(out, state.getBoolean()); } } }
public static void input(MethodHandle methodHandle, NullableBooleanState state, boolean value) { if (state.isNull()) { state.setNull(false); state.setBoolean(value); return; } try { if ((boolean) methodHandle.invokeExact(value, state.getBoolean())) { state.setBoolean(value); } } catch (Throwable t) { Throwables.propagateIfInstanceOf(t, Error.class); Throwables.propagateIfInstanceOf(t, PrestoException.class); throw new PrestoException(INTERNAL_ERROR, t); } }