Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hyperloglog-uda.cc File Reference
#include <assert.h>
#include <math.h>
#include <algorithm>
#include <sstream>
#include <iostream>
#include "udf/udf.h"
#include "common/names.h"
Include dependency graph for hyperloglog-uda.cc:

Go to the source code of this file.

Functions

void HllInit (FunctionContext *ctx, StringVal *dst)
 
static uint64_t FnvHash (const void *data, int32_t bytes, uint64_t hash)
 
static uint64_t Hash (const IntVal &v)
 
void HllUpdate (FunctionContext *ctx, const IntVal &src, StringVal *dst)
 
void HllMerge (FunctionContext *ctx, const StringVal &src, StringVal *dst)
 
StringVal HllSerialize (FunctionContext *ctx, const StringVal &src)
 
StringVal HllFinalize (FunctionContext *ctx, const StringVal &src)
 

Variables

const int HLL_PRECISION = 10
 
static const uint64_t FNV64_PRIME = 1099511628211UL
 
static const uint64_t FNV64_SEED = 14695981039346656037UL
 

Function Documentation

static uint64_t FnvHash ( const void *  data,
int32_t  bytes,
uint64_t  hash 
)
static

Definition at line 47 of file hyperloglog-uda.cc.

References FNV64_PRIME, and impala::hash.

Referenced by Hash().

static uint64_t Hash ( const IntVal v)
static
void HllMerge ( FunctionContext ctx,
const StringVal src,
StringVal dst 
)

Variable Documentation

const uint64_t FNV64_PRIME = 1099511628211UL
static

Definition at line 44 of file hyperloglog-uda.cc.

Referenced by FnvHash().

const uint64_t FNV64_SEED = 14695981039346656037UL
static

Definition at line 45 of file hyperloglog-uda.cc.

Referenced by Hash().

const int HLL_PRECISION = 10

Definition at line 34 of file hyperloglog-uda.cc.

Referenced by HllFinalize(), HllInit(), HllMerge(), and HllUpdate().