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

Classes

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...
 
struct  has_c_type
 
class  HashKernel
 Invoke hash table kernel on input array, returning any output values. More...
 
struct  is_8bit_int
 
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...
 

Typedefs

template<typename T >
using is_number = std::is_base_of< Number, T >
 
template<typename T >
using enable_if_8bit_int = typename std::enable_if< is_8bit_int< T >::value >::type
 
template<typename T >
using enable_if_primitive_ctype = typename std::enable_if< std::is_base_of< PrimitiveCType, T >::value >::type
 
template<typename T >
using enable_if_date = typename std::enable_if< std::is_base_of< DateType, T >::value >::type
 
template<typename T >
using enable_if_time = typename std::enable_if< std::is_base_of< TimeType, T >::value >::type
 
template<typename T >
using enable_if_timestamp = typename std::enable_if< std::is_base_of< TimestampType, T >::value >::type
 
template<typename T >
using enable_if_has_c_type = typename std::enable_if< has_c_type< T >::value >::type
 
template<typename T >
using enable_if_null = typename std::enable_if< std::is_same< NullType, T >::value >::type
 
template<typename T >
using enable_if_binary = typename std::enable_if< std::is_base_of< BinaryType, T >::value >::type
 
template<typename T >
using enable_if_boolean = typename std::enable_if< std::is_same< BooleanType, T >::value >::type
 
template<typename T >
using enable_if_fixed_size_binary = typename std::enable_if< std::is_base_of< FixedSizeBinaryType, T >::value >::type
 
template<typename T >
using enable_if_list = typename std::enable_if< std::is_base_of< ListType, T >::value >::type
 
template<typename T >
using enable_if_number = typename std::enable_if< is_number< T >::value >::type
 

Functions

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)
 

Typedef Documentation

◆ enable_if_8bit_int

template<typename T >
using arrow::compute::enable_if_8bit_int = typedef typename std::enable_if<is_8bit_int<T>::value>::type

◆ enable_if_binary

template<typename T >
using arrow::compute::enable_if_binary = typedef typename std::enable_if<std::is_base_of<BinaryType, T>::value>::type

◆ enable_if_boolean

template<typename T >
using arrow::compute::enable_if_boolean = typedef typename std::enable_if<std::is_same<BooleanType, T>::value>::type

◆ enable_if_date

template<typename T >
using arrow::compute::enable_if_date = typedef typename std::enable_if<std::is_base_of<DateType, T>::value>::type

◆ enable_if_fixed_size_binary

template<typename T >
using arrow::compute::enable_if_fixed_size_binary = typedef typename std::enable_if<std::is_base_of<FixedSizeBinaryType, T>::value>::type

◆ enable_if_has_c_type

template<typename T >
using arrow::compute::enable_if_has_c_type = typedef typename std::enable_if<has_c_type<T>::value>::type

◆ enable_if_list

template<typename T >
using arrow::compute::enable_if_list = typedef typename std::enable_if<std::is_base_of<ListType, T>::value>::type

◆ enable_if_null

template<typename T >
using arrow::compute::enable_if_null = typedef typename std::enable_if<std::is_same<NullType, T>::value>::type

◆ enable_if_number

template<typename T >
using arrow::compute::enable_if_number = typedef typename std::enable_if<is_number<T>::value>::type

◆ enable_if_primitive_ctype

template<typename T >
using arrow::compute::enable_if_primitive_ctype = typedef typename std::enable_if<std::is_base_of<PrimitiveCType, T>::value>::type

◆ enable_if_time

template<typename T >
using arrow::compute::enable_if_time = typedef typename std::enable_if<std::is_base_of<TimeType, T>::value>::type

◆ enable_if_timestamp

template<typename T >
using arrow::compute::enable_if_timestamp = typedef typename std::enable_if<std::is_base_of<TimestampType, T>::value>::type

◆ is_number

template<typename T >
using arrow::compute::is_number = typedef std::is_base_of<Number, T>

Function Documentation

◆ 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

◆ 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