Refine search
@OutputFunction(StandardTypes.HYPER_LOG_LOG) public static void evaluateFinal(@AggregationState HyperLogLogState state, BlockBuilder out) { SERIALIZER.serialize(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))); } } }
@OutputFunction(StandardTypes.INTERVAL_YEAR_TO_MONTH) public static void output(LongAndDoubleState state, BlockBuilder out) { long count = state.getLong(); if (count == 0) { out.appendNull(); } else { double value = state.getDouble(); INTERVAL_YEAR_MONTH.writeLong(out, round(value / count)); } } }
@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())); } } }
@OutputFunction(StandardTypes.INTERVAL_DAY_TO_SECOND) public static void output(LongAndDoubleState state, BlockBuilder out) { long count = state.getLong(); if (count == 0) { out.appendNull(); } else { double value = state.getDouble(); INTERVAL_DAY_TIME.writeLong(out, round(value / count)); } } }
@OutputFunction("Classifier<bigint>") public static void output(@AggregationState LearnState state, BlockBuilder out) { LearnLibSvmClassifierAggregation.output(state, out); } }
@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)); } } }
@OutputFunction(SetDigestType.NAME) public static void output(SetDigestState state, BlockBuilder out) { if (state.getDigest() == null) { out.appendNull(); } else { SET_DIGEST.writeSlice(out, state.getDigest().serialize()); } } }
@OutputFunction(StandardTypes.BIGINT) public static void output(@AggregationState NullableLongState state, BlockBuilder out) { NullableLongState.write(BigintType.BIGINT, state, out); } }
@OutputFunction(StandardTypes.REAL) public static void corr(@AggregationState CorrelationState state, BlockBuilder out) { double result = getCorrelation(state); if (Double.isFinite(result)) { long resultBits = floatToRawIntBits((float) result); REAL.writeLong(out, resultBits); } else { out.appendNull(); } } }
@OutputFunction(StandardTypes.VARCHAR) public static void output(SpatialPartitioningState state, BlockBuilder out) { if (state.getCount() == 0) { out.appendNull(); return; } List<Rectangle> samples = state.getSamples(); int partitionCount = state.getPartitionCount(); int maxItemsPerNode = (samples.size() + partitionCount - 1) / partitionCount; Rectangle envelope = state.getExtent(); // Add a small buffer on the right and upper sides Rectangle paddedExtent = new Rectangle(envelope.getXMin(), envelope.getYMin(), Math.nextUp(envelope.getXMax()), Math.nextUp(envelope.getYMax())); VARCHAR.writeString(out, KdbTreeUtils.toJson(buildKdbTree(maxItemsPerNode, paddedExtent, samples))); } }
@OutputFunction(StandardTypes.BOOLEAN) public static void output(@AggregationState TriStateBooleanState state, BlockBuilder out) { TriStateBooleanState.write(BooleanType.BOOLEAN, state, out); } }
@OutputFunction(StandardTypes.DOUBLE) public static void corr(@AggregationState CorrelationState state, BlockBuilder out) { double result = getCorrelation(state); if (Double.isFinite(result)) { DOUBLE.writeDouble(out, result); } else { out.appendNull(); } } }
@OutputFunction(StandardTypes.VARCHAR) public static void output(SpatialPartitioningState state, BlockBuilder out) { if (state.getCount() == 0) { out.appendNull(); return; } List<Rectangle> samples = state.getSamples(); int partitionCount = state.getPartitionCount(); int maxItemsPerNode = (samples.size() + partitionCount - 1) / partitionCount; Rectangle envelope = state.getExtent(); // Add a small buffer on the right and upper sides Rectangle paddedExtent = new Rectangle(envelope.getXMin(), envelope.getYMin(), Math.nextUp(envelope.getXMax()), Math.nextUp(envelope.getYMax())); VARCHAR.writeString(out, KdbTreeUtils.toJson(buildKdbTree(maxItemsPerNode, paddedExtent, samples))); } }
@OutputFunction(StandardTypes.DOUBLE) public static void output(@AggregationState NullableDoubleState state, BlockBuilder out) { NullableDoubleState.write(DoubleType.DOUBLE, state, out); } }
@OutputFunction(StandardTypes.DOUBLE) public static void output(@AggregationState LongAndDoubleState state, BlockBuilder out) { long count = state.getLong(); if (count == 0) { out.appendNull(); } else { double value = state.getDouble(); DOUBLE.writeDouble(out, value / count); } } }
@OutputFunction(StandardTypes.HYPER_LOG_LOG) public static void output(@AggregationState HyperLogLogState state, BlockBuilder out) { serializer.serialize(state, out); } }
@AggregationFunction("covar_samp") @OutputFunction(StandardTypes.REAL) public static void covarSamp(@AggregationState CovarianceState state, BlockBuilder out) { if (state.getCount() <= 1) { out.appendNull(); } else { double result = getCovarianceSample(state); REAL.writeLong(out, Float.floatToRawIntBits((float) result)); } }
@OutputFunction(StandardTypes.BOOLEAN) public static void output(@AggregationState TriStateBooleanState state, BlockBuilder out) { TriStateBooleanState.write(BooleanType.BOOLEAN, state, out); } }
@AggregationFunction("regr_slope") @OutputFunction(StandardTypes.REAL) public static void regrSlope(@AggregationState RegressionState state, BlockBuilder out) { double result = getRegressionSlope(state); if (Double.isFinite(result)) { REAL.writeLong(out, floatToRawIntBits((float) result)); } else { out.appendNull(); } }