本文整理了Java中io.airlift.stats.cardinality.HyperLogLog.makeDense()
方法的一些代码示例,展示了HyperLogLog.makeDense()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HyperLogLog.makeDense()
方法的具体详情如下:
包路径:io.airlift.stats.cardinality.HyperLogLog
类名称:HyperLogLog
方法名:makeDense
暂无
代码示例来源:origin: prestodb/presto
@ScalarOperator(CAST)
@SqlType(StandardTypes.P4_HYPER_LOG_LOG)
public static Slice castToP4Hll(@SqlType(StandardTypes.HYPER_LOG_LOG) Slice slice)
{
HyperLogLog hll = HyperLogLog.newInstance(slice);
hll.makeDense();
return hll.serialize();
}
代码示例来源:origin: prestodb/presto
@Override
public Object getExpectedValue(int start, int length)
{
if (length == 0) {
return null;
}
HyperLogLog hll = HyperLogLog.newInstance(NUMBER_OF_BUCKETS);
for (int i = start; i < start + length; i++) {
hll.add(i);
}
hll.makeDense();
return new SqlVarbinary(hll.serialize().getBytes());
}
}
代码示例来源:origin: prestodb/presto
@Override
public Block[] getSequenceBlocks(int start, int length)
{
BlockBuilder blockBuilder = HYPER_LOG_LOG.createBlockBuilder(null, length);
for (int i = start; i < start + length; i++) {
HyperLogLog hll = HyperLogLog.newInstance(NUMBER_OF_BUCKETS);
hll.add(i);
hll.makeDense();
HYPER_LOG_LOG.writeSlice(blockBuilder, hll.serialize());
}
return new Block[] {blockBuilder.build()};
}
代码示例来源:origin: io.prestosql/presto-main
@ScalarOperator(CAST)
@SqlType(StandardTypes.P4_HYPER_LOG_LOG)
public static Slice castToP4Hll(@SqlType(StandardTypes.HYPER_LOG_LOG) Slice slice)
{
HyperLogLog hll = HyperLogLog.newInstance(slice);
hll.makeDense();
return hll.serialize();
}
代码示例来源:origin: uk.co.nichesolutions.presto/presto-main
@ScalarOperator(CAST)
@SqlType(StandardTypes.P4_HYPER_LOG_LOG)
public static Slice castToP4Hll(@SqlType(StandardTypes.HYPER_LOG_LOG) Slice slice)
{
HyperLogLog hll = HyperLogLog.newInstance(slice);
hll.makeDense();
return hll.serialize();
}
代码示例来源:origin: prestosql/presto
@ScalarOperator(CAST)
@SqlType(StandardTypes.P4_HYPER_LOG_LOG)
public static Slice castToP4Hll(@SqlType(StandardTypes.HYPER_LOG_LOG) Slice slice)
{
HyperLogLog hll = HyperLogLog.newInstance(slice);
hll.makeDense();
return hll.serialize();
}
代码示例来源:origin: io.prestosql/presto-main
@Override
public Object getExpectedValue(int start, int length)
{
if (length == 0) {
return null;
}
HyperLogLog hll = HyperLogLog.newInstance(NUMBER_OF_BUCKETS);
for (int i = start; i < start + length; i++) {
hll.add(i);
}
hll.makeDense();
return new SqlVarbinary(hll.serialize().getBytes());
}
}
代码示例来源:origin: prestosql/presto
@Override
public Object getExpectedValue(int start, int length)
{
if (length == 0) {
return null;
}
HyperLogLog hll = HyperLogLog.newInstance(NUMBER_OF_BUCKETS);
for (int i = start; i < start + length; i++) {
hll.add(i);
}
hll.makeDense();
return new SqlVarbinary(hll.serialize().getBytes());
}
}
代码示例来源:origin: io.prestosql/presto-main
@Override
public Block[] getSequenceBlocks(int start, int length)
{
BlockBuilder blockBuilder = HYPER_LOG_LOG.createBlockBuilder(null, length);
for (int i = start; i < start + length; i++) {
HyperLogLog hll = HyperLogLog.newInstance(NUMBER_OF_BUCKETS);
hll.add(i);
hll.makeDense();
HYPER_LOG_LOG.writeSlice(blockBuilder, hll.serialize());
}
return new Block[] {blockBuilder.build()};
}
代码示例来源:origin: prestosql/presto
@Override
public Block[] getSequenceBlocks(int start, int length)
{
BlockBuilder blockBuilder = HYPER_LOG_LOG.createBlockBuilder(null, length);
for (int i = start; i < start + length; i++) {
HyperLogLog hll = HyperLogLog.newInstance(NUMBER_OF_BUCKETS);
hll.add(i);
hll.makeDense();
HYPER_LOG_LOG.writeSlice(blockBuilder, hll.serialize());
}
return new Block[] {blockBuilder.build()};
}
内容来源于网络,如有侵权,请联系作者删除!