2728293031323334
@SqlType(StandardTypes.HYPER_LOG_LOG) public static Slice createHll(@SqlType(StandardTypes.BIGINT) long value) { HyperLogLog hll = HyperLogLog.newInstance(4096); hll.add(value); return hll.serialize(); } }
246247248249250251252253254255
HyperLogLog estimator = estimators.get(groupId); if (estimator == null) { output.appendNull(); } else { output.appendSlice(estimator.serialize()); } } } }
146147148149150151152153154155156
HyperLogLog estimator = estimators.get(groupId); if (estimator == null) { output.appendNull(); } else { output.appendSlice(estimator.serialize()); } } private void add(long groupId, BlockCursor cursor) {
@SqlType(HyperLogLogType.class) public static Slice createHll(@SqlType(BigintType.class) long value) { HyperLogLog hll = HyperLogLog.newInstance(4096); hll.add(value); return hll.serialize(); } }
2829303132333435