Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::UtilityFunctions Class Reference

#include <utility-functions.h>

Collaboration diagram for impala::UtilityFunctions:

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)
 

Detailed Description

Definition at line 29 of file utility-functions.h.

Member Function Documentation

StringVal impala::UtilityFunctions::CurrentDatabase ( FunctionContext ctx)
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().

template<typename T >
template BigIntVal impala::UtilityFunctions::FnvHash ( FunctionContext ctx,
const T &  input_val 
)
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.

BigIntVal impala::UtilityFunctions::FnvHashDecimal ( FunctionContext ctx,
const DecimalVal input_val 
)
static
BigIntVal impala::UtilityFunctions::FnvHashString ( FunctionContext ctx,
const StringVal input_val 
)
static
BigIntVal impala::UtilityFunctions::FnvHashTimestamp ( FunctionContext ctx,
const TimestampVal input_val 
)
static

Definition at line 37 of file utility-functions.cc.

References impala_udf::AnyVal::is_null.

IntVal impala::UtilityFunctions::Pid ( FunctionContext ctx)
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().

BooleanVal impala::UtilityFunctions::Sleep ( FunctionContext ctx,
const IntVal milliseconds 
)
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.

template<typename T >
template StringVal impala::UtilityFunctions::TypeOf ( FunctionContext ctx,
const T &  input_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().

StringVal impala::UtilityFunctions::User ( FunctionContext ctx)
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().

StringVal impala::UtilityFunctions::Version ( FunctionContext ctx)
static

Implementation of the version() function. Returns the version string.

Definition at line 82 of file utility-functions.cc.

References impala::GetVersionString().


The documentation for this class was generated from the following files: