Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
udf-builtins.cc File Reference
#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"
Include dependency graph for udf-builtins.cc:

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)
 

Function Documentation

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 
)
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)
TimestampValue TruncWW ( const date &  orig_date)
TimestampValue TruncYear ( const date &  orig_date)

Definition at line 157 of file udf-builtins.cc.

Referenced by impala::UdfBuiltins::Trunc(), and TruncWW().