Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <utility-functions.h>
Static Public Member Functions | |
template<typename T > | |
static BigIntVal | FnvHash (FunctionContext *ctx, const T &input_val) |
static BigIntVal | FnvHashString (FunctionContext *ctx, const StringVal &input_val) |
static BigIntVal | FnvHashTimestamp (FunctionContext *ctx, const TimestampVal &input_val) |
static BigIntVal | FnvHashDecimal (FunctionContext *ctx, const DecimalVal &input_val) |
static StringVal | User (FunctionContext *ctx) |
static StringVal | Version (FunctionContext *ctx) |
Implementation of the version() function. Returns the version string. More... | |
static IntVal | Pid (FunctionContext *ctx) |
static BooleanVal | Sleep (FunctionContext *ctx, const IntVal &milliseconds) |
Testing function that sleeps for the specified number of milliseconds. Returns true. More... | |
static StringVal | CurrentDatabase (FunctionContext *ctx) |
template<typename T > | |
static StringVal | TypeOf (FunctionContext *ctx, const T &input_val) |
Definition at line 29 of file utility-functions.h.
|
static |
Implementation of the current_database() function. Returns the current default database from the parent session of this query.
Definition at line 101 of file utility-functions.cc.
References impala_udf::FunctionContext::impl(), impala_udf::StringVal::len, impala::RuntimeState::query_ctx(), and impala::FunctionContextImpl::state().
|
static |
Implementations of the FnvHash function. Returns the Fowler-Noll-Vo hash of the input as an int64_t.
Definition at line 45 of file utility-functions.cc.
|
static |
Definition at line 53 of file utility-functions.cc.
References impala_udf::FunctionContext::GetArgType(), impala::ColumnType::GetByteSize(), impala_udf::AnyVal::is_null, and impala_udf::DecimalVal::val16.
|
static |
Definition at line 31 of file utility-functions.cc.
References impala_udf::AnyVal::is_null, impala_udf::StringVal::len, and impala_udf::StringVal::ptr.
|
static |
Definition at line 37 of file utility-functions.cc.
References impala_udf::AnyVal::is_null.
|
static |
Implementation of the pid() function. Returns the pid of the impalad that initiated this query.
Definition at line 86 of file utility-functions.cc.
References impala_udf::FunctionContext::impl(), impala::RuntimeState::query_ctx(), and impala::FunctionContextImpl::state().
Referenced by impala::Expr::InitBuiltinsDummy().
|
static |
Testing function that sleeps for the specified number of milliseconds. Returns true.
Definition at line 95 of file utility-functions.cc.
References impala_udf::AnyVal::is_null, impala::SleepForMs(), and impala_udf::IntVal::val.
|
static |
Implementation of the typeOf() function. Returns the type of the input expression. input_val is not used and it is kept here in order to let the compiler generate the corresponding fully-qualified function name.
Definition at line 109 of file utility-functions.cc.
References impala_udf::FunctionContext::GetArgType(), impala_udf::FunctionContext::TypeDesc::len, impala_udf::FunctionContext::TypeDesc::precision, impala_udf::FunctionContext::TypeDesc::scale, impala::ColumnType::type, impala::TYPE_CHAR, impala::TYPE_DECIMAL, impala::TYPE_VARCHAR, and impala::TypeToString().
|
static |
Implementation of the user() function. Returns the username of the user who executed this function.
Definition at line 76 of file utility-functions.cc.
References impala_udf::FunctionContext::user().
|
static |
Implementation of the version() function. Returns the version string.
Definition at line 82 of file utility-functions.cc.
References impala::GetVersionString().