Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <assert.h>
#include <math.h>
#include <algorithm>
#include <sstream>
#include <iostream>
#include "udf/udf.h"
#include "common/names.h"
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 |
Definition at line 47 of file hyperloglog-uda.cc.
References FNV64_PRIME, and impala::hash.
Referenced by Hash().
Definition at line 56 of file hyperloglog-uda.cc.
References FNV64_SEED, FnvHash(), and impala_udf::IntVal::val.
Referenced by impala::AnyValUtil::Hash(), HllUpdate(), impala::DictEncoder< T >::Put(), and impala::TEST_F().
StringVal HllFinalize | ( | FunctionContext * | ctx, |
const StringVal & | src | ||
) |
Definition at line 94 of file hyperloglog-uda.cc.
References impala_udf::FunctionContext::Free(), HLL_PRECISION, impala_udf::AnyVal::is_null, impala_udf::StringVal::len, and impala_udf::StringVal::ptr.
void HllInit | ( | FunctionContext * | ctx, |
StringVal * | dst | ||
) |
Definition at line 36 of file hyperloglog-uda.cc.
References impala_udf::FunctionContext::Allocate(), HLL_PRECISION, impala_udf::AnyVal::is_null, impala_udf::StringVal::len, and impala_udf::StringVal::ptr.
void HllMerge | ( | FunctionContext * | ctx, |
const StringVal & | src, | ||
StringVal * | dst | ||
) |
Definition at line 75 of file hyperloglog-uda.cc.
References HLL_PRECISION, impala_udf::AnyVal::is_null, impala_udf::StringVal::len, and impala_udf::StringVal::ptr.
StringVal HllSerialize | ( | FunctionContext * | ctx, |
const StringVal & | src | ||
) |
Definition at line 86 of file hyperloglog-uda.cc.
References impala_udf::FunctionContext::Free(), impala_udf::AnyVal::is_null, impala_udf::StringVal::len, and impala_udf::StringVal::ptr.
void HllUpdate | ( | FunctionContext * | ctx, |
const IntVal & | src, | ||
StringVal * | dst | ||
) |
Definition at line 60 of file hyperloglog-uda.cc.
References Hash(), impala::hash_value(), HLL_PRECISION, gen_ir_descriptions::idx, impala_udf::AnyVal::is_null, impala_udf::StringVal::len, and impala_udf::StringVal::ptr.
|
static |
Definition at line 44 of file hyperloglog-uda.cc.
Referenced by FnvHash().
|
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().