Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::DictDecoder< T > Class Template Reference

#include <dict-encoding.h>

Inheritance diagram for impala::DictDecoder< T >:
Collaboration diagram for impala::DictDecoder< T >:

Public Member Functions

 DictDecoder (uint8_t *dict_buffer, int dict_len, int fixed_len_size)
 
virtual int num_entries () const
 
bool GetValue (T *value)
 
template<>
bool GetValue (Decimal16Value *value)
 
void SetData (uint8_t *buffer, int buffer_len)
 The rle encoded indices into the dictionary. More...
 

Protected Attributes

boost::scoped_ptr< RleDecoderdata_decoder_
 

Private Attributes

std::vector< T > dict_
 

Detailed Description

template<typename T>
class impala::DictDecoder< T >

Definition at line 187 of file dict-encoding.h.

Constructor & Destructor Documentation

template<typename T >
impala::DictDecoder< T >::DictDecoder ( uint8_t *  dict_buffer,
int  dict_len,
int  fixed_len_size 
)
inline

The input buffer containing the dictionary. 'dict_len' is the byte length of dict_buffer. For string data, the decoder returns StringValues with data directly from dict_buffer (i.e. no copies). fixed_len_size is the size that must be passed to decode fixed-length dictionary values (values stored using FIXED_LEN_BYTE_ARRAY).

Definition at line 311 of file dict-encoding.h.

References impala::ParquetPlainEncoder::Decode().

Member Function Documentation

template<typename T >
bool impala::DictDecoder< T >::GetValue ( T *  value)
inline

Returns the next value. Returns false if the data is invalid. For StringValues, this does not make a copy of the data. Instead, the string data is from the dictionary buffer passed into the c'tor.

Definition at line 264 of file dict-encoding.h.

template<>
bool impala::DictDecoder< Decimal16Value >::GetValue ( Decimal16Value value)
inline

Definition at line 275 of file dict-encoding.h.

template<typename T >
virtual int impala::DictDecoder< T >::num_entries ( ) const
inlinevirtual

Implements impala::DictDecoderBase.

Definition at line 197 of file dict-encoding.h.

References impala::DictDecoder< T >::dict_.

void impala::DictDecoderBase::SetData ( uint8_t *  buffer,
int  buffer_len 
)
inlineinherited

The rle encoded indices into the dictionary.

Definition at line 169 of file dict-encoding.h.

References impala::DictDecoderBase::data_decoder_.

Referenced by impala::ValidateDict().

Member Data Documentation

boost::scoped_ptr<RleDecoder> impala::DictDecoderBase::data_decoder_
protectedinherited

Definition at line 183 of file dict-encoding.h.

Referenced by impala::DictDecoderBase::SetData().

template<typename T >
std::vector<T> impala::DictDecoder< T >::dict_
private

Definition at line 205 of file dict-encoding.h.

Referenced by impala::DictDecoder< T >::num_entries().


The documentation for this class was generated from the following file: