Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::TupleDescriptor Class Reference

#include <descriptors.h>

Collaboration diagram for impala::TupleDescriptor:

Public Member Functions

int byte_size () const
 
int num_null_bytes () const
 
const std::vector
< SlotDescriptor * > & 
slots () const
 
const std::vector
< SlotDescriptor * > & 
string_slots () const
 
const TableDescriptortable_desc () const
 
TupleId id () const
 
std::string DebugString () const
 
llvm::StructType * GenerateLlvmStruct (LlvmCodeGen *codegen)
 

Protected Member Functions

 TupleDescriptor (const TTupleDescriptor &tdesc)
 
void AddSlot (SlotDescriptor *slot)
 

Protected Attributes

const TupleId id_
 
TableDescriptortable_desc_
 
const int byte_size_
 
const int num_null_bytes_
 
int num_materialized_slots_
 
std::vector< SlotDescriptor * > slots_
 
std::vector< SlotDescriptor * > string_slots_
 
llvm::StructType * llvm_struct_
 

Friends

class DescriptorTbl
 

Detailed Description

Definition at line 298 of file descriptors.h.

Constructor & Destructor Documentation

impala::TupleDescriptor::TupleDescriptor ( const TTupleDescriptor &  tdesc)
protected

Definition at line 232 of file descriptors.cc.

Member Function Documentation

void impala::TupleDescriptor::AddSlot ( SlotDescriptor slot)
protected
string impala::TupleDescriptor::DebugString ( ) const

Definition at line 250 of file descriptors.cc.

References byte_size_, id_, slots_, and table_desc_.

Referenced by impala::SlotRef::Prepare().

StructType * impala::TupleDescriptor::GenerateLlvmStruct ( LlvmCodeGen codegen)

Creates a typed struct description for llvm. The layout of the struct is computed by the FE which includes the order of the fields in the resulting struct. Returns the struct type or NULL if the type could not be created. For example, the aggregation tuple for this query: select count(*), min(int_col_a) would map to: struct Tuple { int8_t null_byte; int32_t min_a; int64_t count_val; }; The resulting struct definition is cached.

Definition at line 556 of file descriptors.cc.

References byte_size(), impala::LlvmCodeGen::context(), impala::LlvmCodeGen::execution_engine(), impala::SlotDescriptor::field_idx(), impala::SlotDescriptor::field_idx_, impala::LlvmCodeGen::GetType(), impala::SlotDescriptor::is_materialized(), llvm_struct_, num_materialized_slots_, num_null_bytes_, impala::SlotDescriptor::slot_idx_, slots(), impala::SlotDescriptor::tuple_offset(), impala::ColumnType::type, impala::SlotDescriptor::type(), impala::TYPE_CHAR, and impala::TYPE_TINYINT.

Referenced by impala::HdfsAvroScanner::CodegenMaterializeTuple(), impala::AggregationNode::CodegenUpdateSlot(), impala::PartitionedAggregationNode::CodegenUpdateSlot(), impala::AggregationNode::CodegenUpdateTuple(), impala::PartitionedAggregationNode::CodegenUpdateTuple(), impala::HdfsScanner::CodegenWriteCompleteTuple(), and impala::TextConverter::CodegenWriteSlot().

TupleId impala::TupleDescriptor::id ( ) const
inline

Definition at line 306 of file descriptors.h.

References id_.

Referenced by impala::BlockingJoinNode::Prepare(), and impala::AnalyticEvalNode::Prepare().

int impala::TupleDescriptor::num_null_bytes ( ) const
inline

Friends And Related Function Documentation

friend class DescriptorTbl
friend

Definition at line 323 of file descriptors.h.

Member Data Documentation

const int impala::TupleDescriptor::byte_size_
protected

Definition at line 327 of file descriptors.h.

Referenced by byte_size(), and DebugString().

const TupleId impala::TupleDescriptor::id_
protected

Definition at line 325 of file descriptors.h.

Referenced by DebugString(), and id().

llvm::StructType* impala::TupleDescriptor::llvm_struct_
protected

Definition at line 332 of file descriptors.h.

Referenced by GenerateLlvmStruct().

int impala::TupleDescriptor::num_materialized_slots_
protected

Definition at line 329 of file descriptors.h.

Referenced by AddSlot(), and GenerateLlvmStruct().

const int impala::TupleDescriptor::num_null_bytes_
protected

Definition at line 328 of file descriptors.h.

Referenced by GenerateLlvmStruct(), and num_null_bytes().

std::vector<SlotDescriptor*> impala::TupleDescriptor::slots_
protected

Definition at line 330 of file descriptors.h.

Referenced by AddSlot(), DebugString(), and slots().

std::vector<SlotDescriptor*> impala::TupleDescriptor::string_slots_
protected

Definition at line 331 of file descriptors.h.

Referenced by AddSlot(), and string_slots().

TableDescriptor* impala::TupleDescriptor::table_desc_
protected

Definition at line 326 of file descriptors.h.

Referenced by impala::DescriptorTbl::Create(), DebugString(), and table_desc().


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