The Gandiva Expression CompilerΒΆ

Gandiva is a runtime expression compiler that uses LLVM to generate efficient native code for projections and filters on Arrow record batches. Gandiva only handles projections and filters. For other transformation, see Compute Functions.

Gandiva was designed to take advantage of the Arrow memory format and modern hardware. Compiling expressions using LLVM allows the execution to be optimized to the local runtime environment and hardware, including available SIMD instructions. To minimize optimization overhead, all Gandiva functions are pre-compiled into LLVM IR (intermediate representation).

Building ExpressionsΒΆ

Gandiva provides a general expression representation where expressions are represented by a tree of nodes. The expression trees are built using gandiva::TreeExprBuilder. The leaves of the expression tree are typically field references, created by gandiva::TreeExprBuilder::MakeField(), and literal values, created by gandiva::TreeExprBuilder::MakeLiteral(). Nodes can be combined into more complex expression trees using:

Once an expression tree is built, they are wrapped in either gandiva::Expression or gandiva::Condition, depending on how they will be used. Expression is used in projections while Condition is used filters.

As an example, here is how to create an Expression representing x + 3 and a Condition representing x < 3:

auto field_x_raw = arrow::field("x", arrow::int32());
auto field_x = TreeExprBuilder::MakeField(field_x_raw);
auto literal_3 = TreeExprBuilder::MakeLiteral(3);
auto field_result = arrow::field("result", arrow::int32());

auto add_node = TreeExprBuilder::MakeFunction("add", {field_x, literal_3}, arrow::int32());
auto expression = TreeExprBuilder::MakeExpression(add_node, field_result);

auto less_than_node = TreeExprBuilder::MakeFunction("less_than", {field_x, literal_3},
                                                    boolean());
auto condition = TreeExprBuilder::MakeCondition(less_than_node);

For simpler expressions, there are also convenience functions that allow you to use functions directly in MakeExpression and MakeCondition:

auto expression = TreeExprBuilder::MakeExpression("add", {field_x, literal_3}, field_result);

auto condition = TreeExprBuilder::MakeCondition("less_than", {field_x, literal_3});

Projectors and FiltersΒΆ

Gandiva’s two execution kernels are gandiva::Projector and gandiva::Filter. Projector consumes a record batch and projects into a new record batch. Filter consumes a record batch and produces a gandiva::SelectionVector containing the indices that matched the condition.

For both Projector and Filter, optimization of the expression IR happens when creating instances. They are compiled against a static schema, so the schema of the record batches must be known at this point.

Continuing with the expression and condition created in the previous section, here is an example of creating a Projector and a Filter:

auto schema = arrow::schema({field_x});
std::shared_ptr<Projector> projector;
auto status = Projector::Make(schema, {expression}, &projector);
ARROW_CHECK_OK(status);

std::shared_ptr<Filter> filter;
status = Filter::Make(schema, condition, &filter);
ARROW_CHECK_OK(status);

Once a Projector or Filter is created, it can be evaluated on Arrow record batches. These execution kernels are single-threaded on their own, but are designed to be reused to process record batches in parallel.

Execution is performed with gandiva::Projector::Evaluate() and gandiva::Filter::Evaluate(). Filters produce gandiva::SelectionVector, a vector of row indices that matched the filter condition. When filtering and projecting record batches, you can pass the selection vector into the projector so that the projection is only evaluated on matching rows.

Here is an example of evaluating the Filter and Projector created above:

auto pool = arrow::default_memory_pool();
int num_records = 4;
auto array = MakeArrowArrayInt32({1, 2, 3, 4}, {true, true, true, true});
auto in_batch = arrow::RecordBatch::Make(schema, num_records, {array});

// Just project
arrow::ArrayVector outputs;
status = projector->Evaluate(*in_batch, pool, &outputs);
ARROW_CHECK_OK(status);

// Evaluate filter
gandiva::SelectionVector result_indices;
status = filter->Evaluate(*in_batch, &result_indices);
ARROW_CHECK_OK(status);

// Project with filter
arrow::ArrayVector outputs_filtered;
status = projector->Evaluate(*in_batch, selection_vector.get(),
                             pool, &outputs_filtered);

Available Gandiva FunctionsΒΆ

ComparisonsΒΆ

not

(bool) -> bool

equal

(int8, int8) -> bool

(int16, int16) -> bool

(int32, int32) -> bool

(int64, int64) -> bool

(uint8, uint8) -> bool

(uint16, uint16) -> bool

(uint32, uint32) -> bool

(uint64, uint64) -> bool

(float, float) -> bool

(double, double) -> bool

(decimal128(38, 0), decimal128(38, 0)) -> bool

(date64[ms], date64[ms]) -> bool

(timestamp[ms], timestamp[ms]) -> bool

(time32[ms], time32[ms]) -> bool

(date32[day], date32[day]) -> bool

(bool, bool) -> bool

(string, string) -> bool

(binary, binary) -> bool

eq

(int8, int8) -> bool

(int16, int16) -> bool

(int32, int32) -> bool

(int64, int64) -> bool

(uint8, uint8) -> bool

(uint16, uint16) -> bool

(uint32, uint32) -> bool

(uint64, uint64) -> bool

(float, float) -> bool

(double, double) -> bool

(decimal128(38, 0), decimal128(38, 0)) -> bool

(date64[ms], date64[ms]) -> bool

(timestamp[ms], timestamp[ms]) -> bool

(time32[ms], time32[ms]) -> bool

(date32[day], date32[day]) -> bool

(bool, bool) -> bool

same

(int8, int8) -> bool

(int16, int16) -> bool

(int32, int32) -> bool

(int64, int64) -> bool

(uint8, uint8) -> bool

(uint16, uint16) -> bool

(uint32, uint32) -> bool

(uint64, uint64) -> bool

(float, float) -> bool

(double, double) -> bool

(decimal128(38, 0), decimal128(38, 0)) -> bool

(date64[ms], date64[ms]) -> bool

(timestamp[ms], timestamp[ms]) -> bool

(time32[ms], time32[ms]) -> bool

(date32[day], date32[day]) -> bool

(bool, bool) -> bool

not_equal

(int8, int8) -> bool

(int16, int16) -> bool

(int32, int32) -> bool

(int64, int64) -> bool

(uint8, uint8) -> bool

(uint16, uint16) -> bool

(uint32, uint32) -> bool

(uint64, uint64) -> bool

(float, float) -> bool

(double, double) -> bool

(decimal128(38, 0), decimal128(38, 0)) -> bool

(date64[ms], date64[ms]) -> bool

(timestamp[ms], timestamp[ms]) -> bool

(time32[ms], time32[ms]) -> bool

(date32[day], date32[day]) -> bool

(bool, bool) -> bool

(string, string) -> bool

(binary, binary) -> bool

less_than

(int8, int8) -> bool

(int16, int16) -> bool

(int32, int32) -> bool

(int64, int64) -> bool

(uint8, uint8) -> bool

(uint16, uint16) -> bool

(uint32, uint32) -> bool

(uint64, uint64) -> bool

(float, float) -> bool

(double, double) -> bool

(decimal128(38, 0), decimal128(38, 0)) -> bool

(date64[ms], date64[ms]) -> bool

(timestamp[ms], timestamp[ms]) -> bool

(time32[ms], time32[ms]) -> bool

(date32[day], date32[day]) -> bool

(string, string) -> bool

(binary, binary) -> bool

less_than_or_equal_to

(int8, int8) -> bool

(int16, int16) -> bool

(int32, int32) -> bool

(int64, int64) -> bool

(uint8, uint8) -> bool

(uint16, uint16) -> bool

(uint32, uint32) -> bool

(uint64, uint64) -> bool

(float, float) -> bool

(double, double) -> bool

(decimal128(38, 0), decimal128(38, 0)) -> bool

(date64[ms], date64[ms]) -> bool

(timestamp[ms], timestamp[ms]) -> bool

(time32[ms], time32[ms]) -> bool

(date32[day], date32[day]) -> bool

(string, string) -> bool

(binary, binary) -> bool

greater_than

(int8, int8) -> bool

(int16, int16) -> bool

(int32, int32) -> bool

(int64, int64) -> bool

(uint8, uint8) -> bool

(uint16, uint16) -> bool

(uint32, uint32) -> bool

(uint64, uint64) -> bool

(float, float) -> bool

(double, double) -> bool

(decimal128(38, 0), decimal128(38, 0)) -> bool

(date64[ms], date64[ms]) -> bool

(timestamp[ms], timestamp[ms]) -> bool

(time32[ms], time32[ms]) -> bool

(date32[day], date32[day]) -> bool

(string, string) -> bool

(binary, binary) -> bool

greater_than_or_equal_to

(int8, int8) -> bool

(int16, int16) -> bool

(int32, int32) -> bool

(int64, int64) -> bool

(uint8, uint8) -> bool

(uint16, uint16) -> bool

(uint32, uint32) -> bool

(uint64, uint64) -> bool

(float, float) -> bool

(double, double) -> bool

(decimal128(38, 0), decimal128(38, 0)) -> bool

(date64[ms], date64[ms]) -> bool

(timestamp[ms], timestamp[ms]) -> bool

(time32[ms], time32[ms]) -> bool

(date32[day], date32[day]) -> bool

(string, string) -> bool

(binary, binary) -> bool

isnull

(int8) -> bool

(int16) -> bool

(int32) -> bool

(int64) -> bool

(uint8) -> bool

(uint16) -> bool

(uint32) -> bool

(uint64) -> bool

(float) -> bool

(double) -> bool

(decimal128(38, 0)) -> bool

(date64[ms]) -> bool

(timestamp[ms]) -> bool

(time32[ms]) -> bool

(date32[day]) -> bool

(bool) -> bool

(string) -> bool

(binary) -> bool

isnotnull

(int8) -> bool

(int16) -> bool

(int32) -> bool

(int64) -> bool

(uint8) -> bool

(uint16) -> bool

(uint32) -> bool

(uint64) -> bool

(float) -> bool

(double) -> bool

(decimal128(38, 0)) -> bool

(date64[ms]) -> bool

(timestamp[ms]) -> bool

(time32[ms]) -> bool

(date32[day]) -> bool

(bool) -> bool

(string) -> bool

(binary) -> bool

isnumeric

(int8) -> bool

(int16) -> bool

(int32) -> bool

(int64) -> bool

(uint8) -> bool

(uint16) -> bool

(uint32) -> bool

(uint64) -> bool

(float) -> bool

(double) -> bool

(decimal128(38, 0)) -> bool

is_distinct_from

(int8, int8) -> bool

(int16, int16) -> bool

(int32, int32) -> bool

(int64, int64) -> bool

(uint8, uint8) -> bool

(uint16, uint16) -> bool

(uint32, uint32) -> bool

(uint64, uint64) -> bool

(float, float) -> bool

(double, double) -> bool

(decimal128(38, 0), decimal128(38, 0)) -> bool

(date64[ms], date64[ms]) -> bool

(timestamp[ms], timestamp[ms]) -> bool

(time32[ms], time32[ms]) -> bool

(date32[day], date32[day]) -> bool

(bool, bool) -> bool

is_not_distinct_from

(int8, int8) -> bool

(int16, int16) -> bool

(int32, int32) -> bool

(int64, int64) -> bool

(uint8, uint8) -> bool

(uint16, uint16) -> bool

(uint32, uint32) -> bool

(uint64, uint64) -> bool

(float, float) -> bool

(double, double) -> bool

(decimal128(38, 0), decimal128(38, 0)) -> bool

(date64[ms], date64[ms]) -> bool

(timestamp[ms], timestamp[ms]) -> bool

(time32[ms], time32[ms]) -> bool

(date32[day], date32[day]) -> bool

(bool, bool) -> bool

CastΒΆ

castBIGINT

(int32) -> int64

(decimal128(38, 0)) -> int64

(day_time_interval) -> int64

(string) -> int64

castINT

(int64) -> int32

(string) -> int32

castFLOAT4

(int32) -> float

(int64) -> float

(double) -> float

(string) -> float

castFLOAT8

(int32) -> double

(int64) -> double

(float) -> double

(decimal128(38, 0)) -> double

(string) -> double

castDECIMAL

(int32) -> decimal128(38, 0)

(int64) -> decimal128(38, 0)

(float) -> decimal128(38, 0)

(double) -> decimal128(38, 0)

(decimal128(38, 0)) -> decimal128(38, 0)

(string) -> decimal128(38, 0)

castDECIMALNullOnOverflow

(decimal128(38, 0)) -> decimal128(38, 0)

castDATE

(int64) -> date64[ms]

(int32) -> date32[day]

(date32[day]) -> date64[ms]

(string) -> date64[ms]

(timestamp[ms]) -> date64[ms]

castTIMESTAMP

(string) -> timestamp[ms]

(date64[ms]) -> timestamp[ms]

(int64) -> timestamp[ms]

castVARCHAR

(timestamp[ms], int64) -> string

(bool, int64) -> string

(string, int64) -> string

(binary, int64) -> string

(int32, int64) -> string

(int64, int64) -> string

(float, int64) -> string

(double, int64) -> string

(decimal128(38, 0), int64) -> string

castTIME

(timestamp[ms]) -> time32[ms]

castBIT

(string) -> bool

castBOOLEAN

(string) -> bool

castVARBINARY

(binary, int64) -> binary

(string, int64) -> binary

(int32, int64) -> binary

(int64, int64) -> binary

(float, int64) -> binary

(double, int64) -> binary

Arithmetic and MathΒΆ

add

(int8, int8) -> int8

(int16, int16) -> int16

(int32, int32) -> int32

(int64, int64) -> int64

(uint8, uint8) -> uint8

(uint16, uint16) -> uint16

(uint32, uint32) -> uint32

(uint64, uint64) -> uint64

(float, float) -> float

(double, double) -> double

(decimal128(38, 0), decimal128(38, 0)) -> decimal128(38, 0)

(date64[ms], int32) -> date64[ms]

(timestamp[ms], int32) -> timestamp[ms]

(date64[ms], int64) -> date64[ms]

(timestamp[ms], int64) -> timestamp[ms]

(int32, date64[ms]) -> date64[ms]

(int32, timestamp[ms]) -> timestamp[ms]

(int64, date64[ms]) -> date64[ms]

(int64, timestamp[ms]) -> timestamp[ms]

(date64[ms], int64) -> timestamp[ms]

subtract

(int8, int8) -> int8

(int16, int16) -> int16

(int32, int32) -> int32

(int64, int64) -> int64

(uint8, uint8) -> uint8

(uint16, uint16) -> uint16

(uint32, uint32) -> uint32

(uint64, uint64) -> uint64

(float, float) -> float

(double, double) -> double

(decimal128(38, 0), decimal128(38, 0)) -> decimal128(38, 0)

(date64[ms], int32) -> date64[ms]

(timestamp[ms], int32) -> timestamp[ms]

(date64[ms], int64) -> date64[ms]

(timestamp[ms], int64) -> timestamp[ms]

multiply

(int8, int8) -> int8

(int16, int16) -> int16

(int32, int32) -> int32

(int64, int64) -> int64

(uint8, uint8) -> uint8

(uint16, uint16) -> uint16

(uint32, uint32) -> uint32

(uint64, uint64) -> uint64

(float, float) -> float

(double, double) -> double

(decimal128(38, 0), decimal128(38, 0)) -> decimal128(38, 0)

divide

(int8, int8) -> int8

(int16, int16) -> int16

(int32, int32) -> int32

(int64, int64) -> int64

(uint8, uint8) -> uint8

(uint16, uint16) -> uint16

(uint32, uint32) -> uint32

(uint64, uint64) -> uint64

(float, float) -> float

(double, double) -> double

(decimal128(38, 0), decimal128(38, 0)) -> decimal128(38, 0)

mod

(int64, int32) -> int32

(int64, int64) -> int64

(decimal128(38, 0), decimal128(38, 0)) -> decimal128(38, 0)

(double, double) -> double

modulo

(int64, int32) -> int32

(int64, int64) -> int64

(decimal128(38, 0), decimal128(38, 0)) -> decimal128(38, 0)

(double, double) -> double

div

(int32, int32) -> int32

(int64, int64) -> int64

(float, float) -> float

(double, double) -> double

bitwise_and

(int32, int32) -> int32

(int64, int64) -> int64

bitwise_or

(int32, int32) -> int32

(int64, int64) -> int64

bitwise_xor

(int32, int32) -> int32

(int64, int64) -> int64

bitwise_not

(int32) -> int32

(int64) -> int64

round

(float) -> float

(double) -> double

(float, int32) -> float

(double, int32) -> double

(int32) -> int32

(int64) -> int64

(int32, int32) -> int32

(int64, int32) -> int64

(decimal128(38, 0)) -> decimal128(38, 0)

(decimal128(38, 0), int32) -> decimal128(38, 0)

cbrt

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

exp

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

log

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

(int32, int32) -> double

(int64, int64) -> double

(uint32, uint32) -> double

(uint64, uint64) -> double

(float, float) -> double

(double, double) -> double

log10

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

power

(double, double) -> double

pow

(double, double) -> double

sin

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

cos

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

asin

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

acos

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

tan

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

atan

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

sinh

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

cosh

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

tanh

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

cot

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

radians

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

degrees

(int32) -> double

(int64) -> double

(uint32) -> double

(uint64) -> double

(float) -> double

(double) -> double

atan2

(int32, int32) -> double

(int64, int64) -> double

(uint32, uint32) -> double

(uint64, uint64) -> double

(float, float) -> double

(double, double) -> double

abs

(decimal128(38, 0)) -> decimal128(38, 0)

ceil

(decimal128(38, 0)) -> decimal128(38, 0)

floor

(decimal128(38, 0)) -> decimal128(38, 0)

truncate

(decimal128(38, 0)) -> decimal128(38, 0)

(decimal128(38, 0), int32) -> decimal128(38, 0)

(int64, int32) -> int64

trunc

(decimal128(38, 0)) -> decimal128(38, 0)

(decimal128(38, 0), int32) -> decimal128(38, 0)

(int64, int32) -> int64

random

() -> double

(int32) -> double

rand

() -> double

(int32) -> double

OtherΒΆ

bin

(int32) -> string

(int64) -> string

to_time

(int8) -> time32[ms]

(int16) -> time32[ms]

(int32) -> time32[ms]

(int64) -> time32[ms]

(uint8) -> time32[ms]

(uint16) -> time32[ms]

(uint32) -> time32[ms]

(uint64) -> time32[ms]

(float) -> time32[ms]

(double) -> time32[ms]

to_timestamp

(int8) -> timestamp[ms]

(int16) -> timestamp[ms]

(int32) -> timestamp[ms]

(int64) -> timestamp[ms]

(uint8) -> timestamp[ms]

(uint16) -> timestamp[ms]

(uint32) -> timestamp[ms]

(uint64) -> timestamp[ms]

(float) -> timestamp[ms]

(double) -> timestamp[ms]

sha

(int8) -> string

(int16) -> string

(int32) -> string

(int64) -> string

(uint8) -> string

(uint16) -> string

(uint32) -> string

(uint64) -> string

(float) -> string

(double) -> string

(decimal128(38, 0)) -> string

(bool) -> string

sha1

(int8) -> string

(int16) -> string

(int32) -> string

(int64) -> string

(uint8) -> string

(uint16) -> string

(uint32) -> string

(uint64) -> string

(float) -> string

(double) -> string

(decimal128(38, 0)) -> string

(bool) -> string

sha256

(int8) -> string

(int16) -> string

(int32) -> string

(int64) -> string

(uint8) -> string

(uint16) -> string

(uint32) -> string

(uint64) -> string

(float) -> string

(double) -> string

(decimal128(38, 0)) -> string

(bool) -> string

space

(int32) -> string

(int64) -> string

convert_toDOUBLE

(double) -> binary

convert_toDOUBLE_be

(double) -> binary

convert_toFLOAT

(float) -> binary

convert_toFLOAT_be

(float) -> binary

convert_toINT

(int32) -> binary

convert_toINT_be

(int32) -> binary

convert_toBIGINT

(int64) -> binary

convert_toBIGINT_be

(int64) -> binary

convert_toBOOLEAN_BYTE

(bool) -> binary

Dates and TimestampsΒΆ

extractMillennium

(date64[ms]) -> int64

(timestamp[ms]) -> int64

extractCentury

(date64[ms]) -> int64

(timestamp[ms]) -> int64

extractDecade

(date64[ms]) -> int64

(timestamp[ms]) -> int64

extractYear

(date64[ms]) -> int64

(timestamp[ms]) -> int64

year

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

extractQuarter

(date64[ms]) -> int64

(timestamp[ms]) -> int64

extractMonth

(date64[ms]) -> int64

(timestamp[ms]) -> int64

month

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

extractWeek

(date64[ms]) -> int64

(timestamp[ms]) -> int64

weekofyear

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

yearweek

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

extractDay

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(day_time_interval) -> int64

day

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

dayofmonth

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

extractHour

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(time32[ms]) -> int64

hour

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

(time32[ms]) -> int64

extractMinute

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(time32[ms]) -> int64

minute

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

(time32[ms]) -> int64

extractSecond

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(time32[ms]) -> int64

second

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

(time32[ms]) -> int64

date_trunc_Millennium

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

date_trunc_Century

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

date_trunc_Decade

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

date_trunc_Year

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

date_trunc_Quarter

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

date_trunc_Month

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

date_trunc_Week

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

date_trunc_Day

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

date_trunc_Hour

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

date_trunc_Minute

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

date_trunc_Second

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> timestamp[ms]

extractDoy

(date64[ms]) -> int64

(timestamp[ms]) -> int64

extractDow

(date64[ms]) -> int64

(timestamp[ms]) -> int64

extractEpoch

(date64[ms]) -> int64

(timestamp[ms]) -> int64

to_date

(timestamp[ms]) -> date64[ms]

last_day

(date64[ms]) -> date64[ms]

(timestamp[ms]) -> date64[ms]

sha

(date64[ms]) -> string

(timestamp[ms]) -> string

(time32[ms]) -> string

(date32[day]) -> string

sha1

(date64[ms]) -> string

(timestamp[ms]) -> string

(time32[ms]) -> string

(date32[day]) -> string

sha256

(date64[ms]) -> string

(timestamp[ms]) -> string

(time32[ms]) -> string

(date32[day]) -> string

convert_toTIME_EPOCH

(time32[ms]) -> binary

convert_toTIME_EPOCH_be

(time32[ms]) -> binary

convert_toTIMESTAMP_EPOCH

(timestamp[ms]) -> binary

convert_toTIMESTAMP_EPOCH_be

(timestamp[ms]) -> binary

convert_toDATE_EPOCH

(date64[ms]) -> binary

convert_toDATE_EPOCH_be

(date64[ms]) -> binary

months_between

(date64[ms], date64[ms]) -> double

(timestamp[ms], timestamp[ms]) -> double

timestampdiffSecond

(timestamp[ms], timestamp[ms]) -> int32

timestampdiffMinute

(timestamp[ms], timestamp[ms]) -> int32

timestampdiffHour

(timestamp[ms], timestamp[ms]) -> int32

timestampdiffDay

(timestamp[ms], timestamp[ms]) -> int32

timestampdiffWeek

(timestamp[ms], timestamp[ms]) -> int32

timestampdiffMonth

(timestamp[ms], timestamp[ms]) -> int32

timestampdiffQuarter

(timestamp[ms], timestamp[ms]) -> int32

timestampdiffYear

(timestamp[ms], timestamp[ms]) -> int32

timestampaddSecond

(int32, timestamp[ms]) -> timestamp[ms]

(int32, date64[ms]) -> date64[ms]

(int64, timestamp[ms]) -> timestamp[ms]

(int64, date64[ms]) -> date64[ms]

timestampaddMinute

(int32, timestamp[ms]) -> timestamp[ms]

(int32, date64[ms]) -> date64[ms]

(int64, timestamp[ms]) -> timestamp[ms]

(int64, date64[ms]) -> date64[ms]

timestampaddHour

(int32, timestamp[ms]) -> timestamp[ms]

(int32, date64[ms]) -> date64[ms]

(int64, timestamp[ms]) -> timestamp[ms]

(int64, date64[ms]) -> date64[ms]

timestampaddDay

(int32, timestamp[ms]) -> timestamp[ms]

(int32, date64[ms]) -> date64[ms]

(int64, timestamp[ms]) -> timestamp[ms]

(int64, date64[ms]) -> date64[ms]

timestampaddWeek

(int32, timestamp[ms]) -> timestamp[ms]

(int32, date64[ms]) -> date64[ms]

(int64, timestamp[ms]) -> timestamp[ms]

(int64, date64[ms]) -> date64[ms]

timestampaddMonth

(int32, timestamp[ms]) -> timestamp[ms]

(int32, date64[ms]) -> date64[ms]

(int64, timestamp[ms]) -> timestamp[ms]

(int64, date64[ms]) -> date64[ms]

timestampaddQuarter

(int32, timestamp[ms]) -> timestamp[ms]

(int32, date64[ms]) -> date64[ms]

(int64, timestamp[ms]) -> timestamp[ms]

(int64, date64[ms]) -> date64[ms]

timestampaddYear

(int32, timestamp[ms]) -> timestamp[ms]

(int32, date64[ms]) -> date64[ms]

(int64, timestamp[ms]) -> timestamp[ms]

(int64, date64[ms]) -> date64[ms]

date_add

(date64[ms], int32) -> date64[ms]

(timestamp[ms], int32) -> timestamp[ms]

(date64[ms], int64) -> date64[ms]

(timestamp[ms], int64) -> timestamp[ms]

(int32, date64[ms]) -> date64[ms]

(int32, timestamp[ms]) -> timestamp[ms]

(int64, date64[ms]) -> date64[ms]

(int64, timestamp[ms]) -> timestamp[ms]

date_sub

(date64[ms], int32) -> date64[ms]

(timestamp[ms], int32) -> timestamp[ms]

(date64[ms], int64) -> date64[ms]

(timestamp[ms], int64) -> timestamp[ms]

date_diff

(date64[ms], int32) -> date64[ms]

(timestamp[ms], int32) -> timestamp[ms]

(date64[ms], int64) -> date64[ms]

(timestamp[ms], int64) -> timestamp[ms]

String TransformationsΒΆ

to_date

(string, string) -> date64[ms]

(string, string, int32) -> date64[ms]

sha

(string) -> string

(binary) -> string

sha1

(string) -> string

(binary) -> string

sha256

(string) -> string

(binary) -> string

starts_with

(string, string) -> bool

ends_with

(string, string) -> bool

is_substr

(string, string) -> bool

locate

(string, string) -> int32

(string, string, int32) -> int32

position

(string, string) -> int32

(string, string, int32) -> int32

octet_length

(string) -> int32

(binary) -> int32

bit_length

(string) -> int32

(binary) -> int32

char_length

(string) -> int32

length

(string) -> int32

lengthUtf8

(binary) -> int32

reverse

(string) -> string

ltrim

(string) -> string

(string, string) -> string

rtrim

(string) -> string

(string, string) -> string

btrim

(string) -> string

(string, string) -> string

ascii

(string) -> int32

base64

(binary) -> string

unbase64

(string) -> binary

upper

(string) -> string

lower

(string) -> string

initcap

(string) -> string

like

(string, string) -> bool

(string, string, string) -> bool

ilike

(string, string) -> bool

substr

(string, int64, int64) -> string

(string, int64) -> string

substring

(string, int64, int64) -> string

(string, int64) -> string

lpad

(string, int32, string) -> string

(string, int32) -> string

rpad

(string, int32, string) -> string

(string, int32) -> string

concatOperator

(string, string) -> string

(string, string, string) -> string

(string, string, string, string) -> string

(string, string, string, string, string) -> string

(string, string, string, string, string, string) -> string

(string, string, string, string, string, string, string) -> string

(string, string, string, string, string, string, string, string) -> string

(string, string, string, string, string, string, string, string, string) -> string

(string, string, string, string, string, string, string, string, string, string) -> string

concat

(string, string) -> string

(string, string, string) -> string

(string, string, string, string) -> string

(string, string, string, string, string) -> string

(string, string, string, string, string, string) -> string

(string, string, string, string, string, string, string) -> string

(string, string, string, string, string, string, string, string) -> string

(string, string, string, string, string, string, string, string, string) -> string

(string, string, string, string, string, string, string, string, string, string) -> string

byte_substr

(binary, int32, int32) -> binary

bytesubstring

(binary, int32, int32) -> binary

convert_fromUTF8

(binary) -> string

convert_fromutf8

(binary) -> string

convert_replaceUTF8

(binary, string) -> string

convert_replaceutf8

(binary, string) -> string

convert_toUTF8

(string) -> binary

replace

(string, string, string) -> string

binary_string

(string) -> binary

left

(string, int32) -> string

right

(string, int32) -> string

split_part

(string, string, int32) -> string

HashΒΆ

hash

(int8) -> int32

(int16) -> int32

(int32) -> int32

(int64) -> int32

(uint8) -> int32

(uint16) -> int32

(uint32) -> int32

(uint64) -> int32

(float) -> int32

(double) -> int32

(decimal128(38, 0)) -> int32

(date64[ms]) -> int32

(timestamp[ms]) -> int32

(time32[ms]) -> int32

(date32[day]) -> int32

(bool) -> int32

(string) -> int32

(binary) -> int32

hash32

(int8) -> int32

(int16) -> int32

(int32) -> int32

(int64) -> int32

(uint8) -> int32

(uint16) -> int32

(uint32) -> int32

(uint64) -> int32

(float) -> int32

(double) -> int32

(decimal128(38, 0)) -> int32

(date64[ms]) -> int32

(timestamp[ms]) -> int32

(time32[ms]) -> int32

(date32[day]) -> int32

(bool) -> int32

(string) -> int32

(binary) -> int32

(int8, int32) -> int32

(int16, int32) -> int32

(int32, int32) -> int32

(int64, int32) -> int32

(uint8, int32) -> int32

(uint16, int32) -> int32

(uint32, int32) -> int32

(uint64, int32) -> int32

(float, int32) -> int32

(double, int32) -> int32

(decimal128(38, 0), int32) -> int32

(date64[ms], int32) -> int32

(timestamp[ms], int32) -> int32

(time32[ms], int32) -> int32

(date32[day], int32) -> int32

(bool, int32) -> int32

(string, int32) -> int32

(binary, int32) -> int32

hash32AsDouble

(int8) -> int32

(int16) -> int32

(int32) -> int32

(int64) -> int32

(uint8) -> int32

(uint16) -> int32

(uint32) -> int32

(uint64) -> int32

(float) -> int32

(double) -> int32

(decimal128(38, 0)) -> int32

(date64[ms]) -> int32

(timestamp[ms]) -> int32

(time32[ms]) -> int32

(date32[day]) -> int32

(bool) -> int32

(string) -> int32

(binary) -> int32

(int8, int32) -> int32

(int16, int32) -> int32

(int32, int32) -> int32

(int64, int32) -> int32

(uint8, int32) -> int32

(uint16, int32) -> int32

(uint32, int32) -> int32

(uint64, int32) -> int32

(float, int32) -> int32

(double, int32) -> int32

(decimal128(38, 0), int32) -> int32

(date64[ms], int32) -> int32

(timestamp[ms], int32) -> int32

(time32[ms], int32) -> int32

(date32[day], int32) -> int32

(bool, int32) -> int32

(string, int32) -> int32

(binary, int32) -> int32

hash64

(int8) -> int64

(int16) -> int64

(int32) -> int64

(int64) -> int64

(uint8) -> int64

(uint16) -> int64

(uint32) -> int64

(uint64) -> int64

(float) -> int64

(double) -> int64

(decimal128(38, 0)) -> int64

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(time32[ms]) -> int64

(date32[day]) -> int64

(bool) -> int64

(string) -> int64

(binary) -> int64

(int8, int64) -> int64

(int16, int64) -> int64

(int32, int64) -> int64

(int64, int64) -> int64

(uint8, int64) -> int64

(uint16, int64) -> int64

(uint32, int64) -> int64

(uint64, int64) -> int64

(float, int64) -> int64

(double, int64) -> int64

(decimal128(38, 0), int64) -> int64

(date64[ms], int64) -> int64

(timestamp[ms], int64) -> int64

(time32[ms], int64) -> int64

(date32[day], int64) -> int64

(bool, int64) -> int64

(string, int64) -> int64

(binary, int64) -> int64

hash64AsDouble

(int8) -> int64

(int16) -> int64

(int32) -> int64

(int64) -> int64

(uint8) -> int64

(uint16) -> int64

(uint32) -> int64

(uint64) -> int64

(float) -> int64

(double) -> int64

(decimal128(38, 0)) -> int64

(date64[ms]) -> int64

(timestamp[ms]) -> int64

(time32[ms]) -> int64

(date32[day]) -> int64

(bool) -> int64

(string) -> int64

(binary) -> int64

(int8, int64) -> int64

(int16, int64) -> int64

(int32, int64) -> int64

(int64, int64) -> int64

(uint8, int64) -> int64

(uint16, int64) -> int64

(uint32, int64) -> int64

(uint64, int64) -> int64

(float, int64) -> int64

(double, int64) -> int64

(decimal128(38, 0), int64) -> int64

(date64[ms], int64) -> int64

(timestamp[ms], int64) -> int64

(time32[ms], int64) -> int64

(date32[day], int64) -> int64

(bool, int64) -> int64

(string, int64) -> int64

(binary, int64) -> int64

hashSHA1

(int8) -> string

(int16) -> string

(int32) -> string

(int64) -> string

(uint8) -> string

(uint16) -> string

(uint32) -> string

(uint64) -> string

(float) -> string

(double) -> string

(decimal128(38, 0)) -> string

(date64[ms]) -> string

(timestamp[ms]) -> string

(time32[ms]) -> string

(date32[day]) -> string

(bool) -> string

(string) -> string

(binary) -> string

hashSHA256

(int8) -> string

(int16) -> string

(int32) -> string

(int64) -> string

(uint8) -> string

(uint16) -> string

(uint32) -> string

(uint64) -> string

(float) -> string

(double) -> string

(decimal128(38, 0)) -> string

(date64[ms]) -> string

(timestamp[ms]) -> string

(time32[ms]) -> string

(date32[day]) -> string

(bool) -> string

(string) -> string

(binary) -> string