Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
Classes | Functions
arrow::compute Namespace Reference

Classes

class  BinaryKernel
 An array-valued function of a two input arguments. More...
 
struct  CastOptions
 
class  Datum
 Variant type for various Arrow C++ data structures. More...
 
class  FunctionContext
 Container for variables and options used by function evaluation. More...
 
class  HashKernel
 Invoke hash table kernel on input array, returning any output values. More...
 
class  OpKernel
 Base class for operator kernels. More...
 
struct  Scalar
 Placeholder for Scalar values until we implement these. More...
 
class  UnaryKernel
 An array-valued function of a single input argument. More...
 

Functions

Status Invert (FunctionContext *context, const Datum &value, Datum *out)
 Invert the values of a boolean datum. More...
 
Status And (FunctionContext *context, const Datum &left, const Datum &right, Datum *out)
 Element-wise AND of two boolean dates. More...
 
Status Or (FunctionContext *context, const Datum &left, const Datum &right, Datum *out)
 Element-wise OR of two boolean dates. More...
 
Status Xor (FunctionContext *context, const Datum &left, const Datum &right, Datum *out)
 Element-wise XOR of two boolean dates. More...
 
Status GetCastFunction (const DataType &in_type, const std::shared_ptr< DataType > &to_type, const CastOptions &options, std::unique_ptr< UnaryKernel > *kernel)
 
Status Cast (FunctionContext *context, const Array &value, const std::shared_ptr< DataType > &to_type, const CastOptions &options, std::shared_ptr< Array > *out)
 Cast from one array type to another. More...
 
Status Cast (FunctionContext *context, const Datum &value, const std::shared_ptr< DataType > &to_type, const CastOptions &options, Datum *out)
 Cast from one value to another. More...
 
Status GetUniqueKernel (FunctionContext *ctx, const std::shared_ptr< DataType > &type, std::unique_ptr< HashKernel > *kernel)
 
Status GetDictionaryEncodeKernel (FunctionContext *ctx, const std::shared_ptr< DataType > &type, std::unique_ptr< HashKernel > *kernel)
 
Status Unique (FunctionContext *context, const Datum &datum, std::shared_ptr< Array > *out)
 Compute unique elements from an array-like object. More...
 
Status DictionaryEncode (FunctionContext *context, const Datum &data, Datum *out)
 Dictionary-encode values in an array-like object. More...
 
template<typename T >
const T * GetValues (const ArrayData &data, int i)
 
template<typename T >
T * GetMutableValues (const ArrayData *data, int i)
 

Function Documentation

◆ And()

Status arrow::compute::And ( FunctionContext context,
const Datum left,
const Datum right,
Datum out 
)

Element-wise AND of two boolean dates.

Parameters
[in]contextthe FunctionContext
[in]leftleft operand (array)
[in]rightright operand (array)
[out]outresulting datum
Since
0.11.0
Note
API not yet finalized

◆ Cast() [1/2]

Status arrow::compute::Cast ( FunctionContext context,
const Array value,
const std::shared_ptr< DataType > &  to_type,
const CastOptions options,
std::shared_ptr< Array > *  out 
)

Cast from one array type to another.

Parameters
[in]contextthe FunctionContext
[in]valuearray to cast
[in]to_typetype to cast to
[in]optionscasting options
[out]outresulting array
Since
0.7.0
Note
API not yet finalized

◆ Cast() [2/2]

Status arrow::compute::Cast ( FunctionContext context,
const Datum value,
const std::shared_ptr< DataType > &  to_type,
const CastOptions options,
Datum out 
)

Cast from one value to another.

Parameters
[in]contextthe FunctionContext
[in]valuedatum to cast
[in]to_typetype to cast to
[in]optionscasting options
[out]outresulting datum
Since
0.8.0
Note
API not yet finalized

◆ DictionaryEncode()

Status arrow::compute::DictionaryEncode ( FunctionContext context,
const Datum data,
Datum out 
)

Dictionary-encode values in an array-like object.

Parameters
[in]contextthe FunctionContext
[in]dataarray-like input
[out]outresult with same shape and type as input
Since
0.8.0
Note
API not yet finalized

◆ GetCastFunction()

Status arrow::compute::GetCastFunction ( const DataType in_type,
const std::shared_ptr< DataType > &  to_type,
const CastOptions options,
std::unique_ptr< UnaryKernel > *  kernel 
)
Since
0.7.0
Note
API not yet finalized

◆ GetDictionaryEncodeKernel()

Status arrow::compute::GetDictionaryEncodeKernel ( FunctionContext ctx,
const std::shared_ptr< DataType > &  type,
std::unique_ptr< HashKernel > *  kernel 
)

◆ GetMutableValues()

template<typename T >
T* arrow::compute::GetMutableValues ( const ArrayData data,
int  i 
)
inline

◆ GetUniqueKernel()

Status arrow::compute::GetUniqueKernel ( FunctionContext ctx,
const std::shared_ptr< DataType > &  type,
std::unique_ptr< HashKernel > *  kernel 
)
Since
0.8.0
Note
API not yet finalized

◆ GetValues()

template<typename T >
const T* arrow::compute::GetValues ( const ArrayData data,
int  i 
)
inline

◆ Invert()

Status arrow::compute::Invert ( FunctionContext context,
const Datum value,
Datum out 
)

Invert the values of a boolean datum.

Parameters
[in]contextthe FunctionContext
[in]valuedatum to invert
[out]outresulting datum
Since
0.11.0
Note
API not yet finalized

◆ Or()

Status arrow::compute::Or ( FunctionContext context,
const Datum left,
const Datum right,
Datum out 
)

Element-wise OR of two boolean dates.

Parameters
[in]contextthe FunctionContext
[in]leftleft operand (array)
[in]rightright operand (array)
[out]outresulting datum
Since
0.11.0
Note
API not yet finalized

◆ Unique()

Status arrow::compute::Unique ( FunctionContext context,
const Datum datum,
std::shared_ptr< Array > *  out 
)

Compute unique elements from an array-like object.

Parameters
[in]contextthe FunctionContext
[in]datumarray-like input
[out]outresult as Array
Since
0.8.0
Note
API not yet finalized

◆ Xor()

Status arrow::compute::Xor ( FunctionContext context,
const Datum left,
const Datum right,
Datum out 
)

Element-wise XOR of two boolean dates.

Parameters
[in]contextthe FunctionContext
[in]leftleft operand (array)
[in]rightright operand (array)
[out]outresulting datum
Since
0.11.0
Note
API not yet finalized