Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include "exprs/udf-builtins.h"
#include <ctype.h>
#include <gutil/strings/substitute.h>
#include <iostream>
#include <math.h>
#include <sstream>
#include <string>
#include "gen-cpp/Exprs_types.h"
#include "runtime/timestamp-value.h"
#include "util/bit-util.h"
#include "common/names.h"
Go to the source code of this file.
Classes | |
struct | TruncUnit |
Functions | |
TruncUnit::Type | StrToTruncUnit (FunctionContext *ctx, const StringVal &unit_str) |
date | GoBackToWeekday (const date &orig_date, int week_day) |
TimestampValue | TruncYear (const date &orig_date) |
TimestampValue | TruncQuarter (const date &orig_date) |
TimestampValue | TruncMonth (const date &orig_date) |
TimestampValue | TruncWW (const date &orig_date) |
TimestampValue | TruncW (const date &orig_date) |
TimestampValue | TruncDay (const date &orig_date) |
TimestampValue | TruncDayOfWeek (const date &orig_date) |
TimestampValue | TruncHour (const date &orig_date, const time_duration &orig_time) |
TimestampValue | TruncMinute (const date &orig_date, const time_duration &orig_time) |
TExtractField::type | StrToExtractField (FunctionContext *ctx, const StringVal &unit_str) |
bool | ValidateMADlibVector (FunctionContext *context, const StringVal &arr) |
void | InplaceDoubleEncode (double *arr, uint64_t len) |
void | InplaceDoubleDecode (char *arr, uint64_t len) |
date GoBackToWeekday | ( | const date & | orig_date, |
int | week_day | ||
) |
Definition at line 143 of file udf-builtins.cc.
Referenced by TruncDayOfWeek(), TruncW(), and TruncWW().
void InplaceDoubleDecode | ( | char * | arr, |
uint64_t | len | ||
) |
Definition at line 532 of file udf-builtins.cc.
Referenced by impala::UdfBuiltins::DecodeVector().
void InplaceDoubleEncode | ( | double * | arr, |
uint64_t | len | ||
) |
Definition at line 516 of file udf-builtins.cc.
Referenced by impala::UdfBuiltins::EncodeVector().
TExtractField::type StrToExtractField | ( | FunctionContext * | ctx, |
const StringVal & | unit_str | ||
) |
Definition at line 331 of file udf-builtins.cc.
References EPOCH, impala::UdfBuiltins::Lower(), and impala::YEAR.
Referenced by impala::UdfBuiltins::Extract(), and impala::UdfBuiltins::ExtractPrepare().
TruncUnit::Type StrToTruncUnit | ( | FunctionContext * | ctx, |
const StringVal & | unit_str | ||
) |
Definition at line 115 of file udf-builtins.cc.
References TruncUnit::DAY, TruncUnit::DAY_OF_WEEK, TruncUnit::HOUR, impala::UdfBuiltins::Lower(), TruncUnit::MINUTE, TruncUnit::MONTH, TruncUnit::QUARTER, TruncUnit::UNIT_INVALID, TruncUnit::W, TruncUnit::WW, and TruncUnit::YEAR.
Referenced by impala::UdfBuiltins::Trunc(), and impala::UdfBuiltins::TruncPrepare().
TimestampValue TruncDay | ( | const date & | orig_date | ) |
Definition at line 196 of file udf-builtins.cc.
Referenced by impala::UdfBuiltins::Trunc().
TimestampValue TruncDayOfWeek | ( | const date & | orig_date | ) |
Definition at line 202 of file udf-builtins.cc.
References GoBackToWeekday().
Referenced by impala::UdfBuiltins::Trunc().
TimestampValue TruncHour | ( | const date & | orig_date, |
const time_duration & | orig_time | ||
) |
Definition at line 209 of file udf-builtins.cc.
Referenced by impala::UdfBuiltins::Trunc().
TimestampValue TruncMinute | ( | const date & | orig_date, |
const time_duration & | orig_time | ||
) |
Definition at line 215 of file udf-builtins.cc.
Referenced by impala::UdfBuiltins::Trunc().
TimestampValue TruncMonth | ( | const date & | orig_date | ) |
Definition at line 172 of file udf-builtins.cc.
Referenced by impala::UdfBuiltins::Trunc(), and TruncW().
TimestampValue TruncQuarter | ( | const date & | orig_date | ) |
Definition at line 164 of file udf-builtins.cc.
References impala::BitUtil::RoundDown().
Referenced by impala::UdfBuiltins::Trunc().
TimestampValue TruncW | ( | const date & | orig_date | ) |
Definition at line 188 of file udf-builtins.cc.
References impala::TimestampValue::date(), GoBackToWeekday(), and TruncMonth().
Referenced by impala::UdfBuiltins::Trunc().
TimestampValue TruncWW | ( | const date & | orig_date | ) |
Definition at line 179 of file udf-builtins.cc.
References impala::TimestampValue::date(), GoBackToWeekday(), and TruncYear().
Referenced by impala::UdfBuiltins::Trunc().
TimestampValue TruncYear | ( | const date & | orig_date | ) |
Definition at line 157 of file udf-builtins.cc.
Referenced by impala::UdfBuiltins::Trunc(), and TruncWW().
bool ValidateMADlibVector | ( | FunctionContext * | context, |
const StringVal & | arr | ||
) |
Definition at line 462 of file udf-builtins.cc.
References impala_udf::StringVal::len, impala_udf::StringVal::ptr, and impala_udf::FunctionContext::SetError().
Referenced by impala::UdfBuiltins::PrintVector(), and impala::UdfBuiltins::VectorGet().