@CombineFunction public static void combine(@AggregationState LearnState state, @AggregationState LearnState otherState) { throw new UnsupportedOperationException("LEARN must run on a single machine"); }
@InputFunction public static void add(@AggregationState State state, @SqlType(BIGINT) long buckets, @SqlType(DOUBLE) double value) { add(state, buckets, value, 1); }
@OutputFunction(StandardTypes.BIGINT) public static void output(@AggregationState NullableLongState state, BlockBuilder out) { NullableLongState.write(BigintType.BIGINT, state, out); } }
@OutputFunction(StandardTypes.REAL) public static void output(@AggregationState LongAndDoubleState state, BlockBuilder out) { long count = state.getLong(); if (count == 0) { out.appendNull(); } else { REAL.writeLong(out, floatToRawIntBits((float) Math.exp(state.getDouble() / count))); } } }
@InputFunction @TypeParameter("T") public static void input( @OperatorDependency(operator = XX_HASH_64, returnType = StandardTypes.BIGINT, argumentTypes = {"T"}) MethodHandle methodHandle, @AggregationState HyperLogLogState state, @SqlType("T") double value) { ApproximateCountDistinctAggregation.input(methodHandle, state, value, DEFAULT_STANDARD_ERROR); }
@OutputFunction("double") public static void output( @TypeParameter("ROW(ARRAY(BIGINT),ROW(ROW(CHAR)),BIGINT,MAP(BIGINT,CHAR))") Type type, @AggregationState NullableDoubleState state, BlockBuilder out) { // noop this is only for annotation testing puproses } }
@CombineFunction public static void combine( @TypeParameter("T") Type type, @AggregationState NullableDoubleState combine1, @AggregationState NullableDoubleState combine2) { // noop this is only for annotation testing puproses }
@OutputFunction(StandardTypes.DOUBLE) public static void output(@AggregationState LongAndDoubleState state, BlockBuilder out) { long count = state.getLong(); if (count == 0) { out.appendNull(); } else { DOUBLE.writeDouble(out, Math.exp(state.getDouble() / count)); } } }
@InputFunction @TypeParameter("T") public static void input( @OperatorDependency(operator = XX_HASH_64, returnType = StandardTypes.BIGINT, argumentTypes = {"T"}) MethodHandle methodHandle, @AggregationState HyperLogLogState state, @SqlType("T") Slice value) { ApproximateCountDistinctAggregation.input(methodHandle, state, value, DEFAULT_STANDARD_ERROR); }
@InputFunction public static void input(@AggregationState CovarianceState state, @SqlType(StandardTypes.DOUBLE) double dependentValue, @SqlType(StandardTypes.DOUBLE) double independentValue) { updateCovarianceState(state, independentValue, dependentValue); }
@CombineFunction public static void combine(@AggregationState LearnState state, @AggregationState LearnState otherState) { throw new UnsupportedOperationException("LEARN must run on a single machine"); }
@OutputFunction(StandardTypes.BOOLEAN) public static void output(@AggregationState TriStateBooleanState state, BlockBuilder out) { TriStateBooleanState.write(BooleanType.BOOLEAN, state, out); } }
@OutputFunction("T") public static void output( @TypeParameter("T") Type type, @AggregationState NullableDoubleState state, BlockBuilder out) { // noop this is only for annotation testing puproses }
@CombineFunction public static void combine( @TypeParameter("ROW(ARRAY(BIGINT),ROW(ROW(CHAR)),BIGINT,MAP(BIGINT,CHAR))") Type type, @AggregationState NullableDoubleState state, @AggregationState NullableDoubleState otherState) { // noop this is only for annotation testing puproses }
@OutputFunction(StandardTypes.REAL) public static void output(@AggregationState NullableDoubleState state, BlockBuilder out) { if (state.isNull()) { out.appendNull(); } else { REAL.writeLong(out, floatToRawIntBits((float) state.getDouble())); } } }
@InputFunction @TypeParameter("T") public static void input( @OperatorDependency(operator = XX_HASH_64, returnType = StandardTypes.BIGINT, argumentTypes = {"T"}) MethodHandle methodHandle, @AggregationState HyperLogLogState state, @SqlType("T") long value) { ApproximateCountDistinctAggregation.input(methodHandle, state, value, DEFAULT_STANDARD_ERROR); }
@InputFunction public static void input(@AggregationState RegressionState state, @SqlType(StandardTypes.REAL) long dependentValue, @SqlType(StandardTypes.REAL) long independentValue) { DoubleRegressionAggregation.input(state, intBitsToFloat((int) dependentValue), intBitsToFloat((int) independentValue)); }
@CombineFunction public static void combine(@AggregationState CentralMomentsState state, @AggregationState CentralMomentsState otherState) { mergeCentralMomentsState(state, otherState); }
@OutputFunction(StandardTypes.DOUBLE) public static void output(@AggregationState NullableDoubleState state, BlockBuilder out) { NullableDoubleState.write(DoubleType.DOUBLE, state, out); } }
@OutputFunction("double") @TypeParameter("T1") @TypeParameter("T2") public static void output( @TypeParameter("ROW(ARRAY(T1),ROW(ROW(T2)),CHAR)") Type type, @AggregationState NullableDoubleState state, BlockBuilder out) { // noop this is only for annotation testing puproses } }