Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <descriptors.h>
Public Member Functions | |
SlotId | id () const |
const ColumnType & | type () const |
TupleId | parent () const |
int | col_pos () const |
const std::vector< int > & | col_path () const |
int | field_idx () const |
Returns the field index in the generated llvm struct for this slot's tuple. More... | |
int | tuple_offset () const |
const NullIndicatorOffset & | null_indicator_offset () const |
bool | is_materialized () const |
bool | is_nullable () const |
int | slot_size () const |
std::string | DebugString () const |
llvm::Function * | CodegenIsNull (LlvmCodeGen *, llvm::StructType *tuple) |
llvm::Function * | CodegenUpdateNull (LlvmCodeGen *, llvm::StructType *tuple, bool set_null) |
Static Public Member Functions | |
static bool | ColPathLessThan (const SlotDescriptor *a, const SlotDescriptor *b) |
Private Member Functions | |
SlotDescriptor (const TSlotDescriptor &tdesc) | |
Private Attributes | |
const SlotId | id_ |
const ColumnType | type_ |
const TupleId | parent_ |
const std::vector< int > | col_path_ |
const int | tuple_offset_ |
const NullIndicatorOffset | null_indicator_offset_ |
const int | slot_idx_ |
const int | slot_size_ |
the byte size of this slot. More... | |
int | field_idx_ |
const bool | is_materialized_ |
llvm::Function * | is_null_fn_ |
Cached codegen'd functions. More... | |
llvm::Function * | set_not_null_fn_ |
llvm::Function * | set_null_fn_ |
Friends | |
class | DescriptorTbl |
class | TupleDescriptor |
Definition at line 75 of file descriptors.h.
|
private |
Definition at line 50 of file descriptors.cc.
Function * impala::SlotDescriptor::CodegenIsNull | ( | LlvmCodeGen * | , |
llvm::StructType * | tuple | ||
) |
Codegen for: bool IsNull(Tuple* tuple) The codegen function is cached.
Definition at line 476 of file descriptors.cc.
References impala::LlvmCodeGen::FnPrototype::AddArgument(), impala::NullIndicatorOffset::bit_mask, impala::NullIndicatorOffset::byte_offset, impala::LlvmCodeGen::context(), impala::LlvmCodeGen::FinalizeFunction(), impala::LlvmCodeGen::GetIntConstant(), impala::LlvmCodeGen::GetType(), is_null_fn_, null_indicator_offset_, impala::TYPE_BOOLEAN, and impala::TYPE_TINYINT.
Function * impala::SlotDescriptor::CodegenUpdateNull | ( | LlvmCodeGen * | , |
llvm::StructType * | tuple, | ||
bool | set_null | ||
) |
Codegen for: void SetNull(Tuple* tuple) / SetNotNull The codegen function is cached.
Definition at line 510 of file descriptors.cc.
References impala::LlvmCodeGen::FnPrototype::AddArgument(), impala::NullIndicatorOffset::bit_mask, impala::NullIndicatorOffset::byte_offset, impala::LlvmCodeGen::context(), impala::LlvmCodeGen::FinalizeFunction(), impala::LlvmCodeGen::GetIntConstant(), null_indicator_offset_, set_not_null_fn_, set_null_fn_, impala::TYPE_TINYINT, and impala::LlvmCodeGen::void_type().
Referenced by impala::HdfsAvroScanner::CodegenMaterializeTuple(), impala::AggregationNode::CodegenUpdateSlot(), impala::PartitionedAggregationNode::CodegenUpdateSlot(), and impala::TextConverter::CodegenWriteSlot().
|
inline |
Definition at line 85 of file descriptors.h.
References col_path_.
Referenced by ColPathLessThan(), impala::HdfsScanNode::ComputeSlotMaterializationOrder(), impala::HdfsParquetScanner::CreateColumnReaders(), and impala::TableDescriptor::IsClusteringCol().
|
inline |
Returns the column index of this slot, including partition keys. (e.g., col_pos - num_partition_keys = the table column this slot corresponds to) TODO: This function should eventually be replaced by col_path(). It is currently convenient for table formats for which we only support flat data.
Definition at line 84 of file descriptors.h.
References col_path_.
Referenced by impala::HdfsScanNode::InitTemplateTuple(), impala::DataSourceScanNode::Open(), impala::HdfsRCFileScanner::ProcessRange(), impala::HdfsScanner::ReportColumnParseError(), impala::HdfsAvroScanner::ResolveSchemas(), and impala::HdfsAvroScanner::VerifyTypesMatch().
|
static |
Comparison function for ordering slot descriptors by their col_path_. Returns true if 'a' comes before 'b'. Orders the paths as in a depth-first traversal of the schema tree, as follows:
Definition at line 66 of file descriptors.cc.
References col_path().
Referenced by impala::HBaseScanNode::Prepare(), and impala::HdfsScanNode::Prepare().
string impala::SlotDescriptor::DebugString | ( | ) | const |
Definition at line 75 of file descriptors.cc.
References col_path_, impala::NullIndicatorOffset::DebugString(), impala::ColumnType::DebugString(), field_idx_, id_, null_indicator_offset_, slot_idx_, tuple_offset_, and type_.
Referenced by impala::SlotRef::Prepare().
|
inline |
Returns the field index in the generated llvm struct for this slot's tuple.
Definition at line 87 of file descriptors.h.
References field_idx_.
Referenced by impala::HdfsAvroScanner::CodegenMaterializeTuple(), impala::AggregationNode::CodegenUpdateSlot(), impala::PartitionedAggregationNode::CodegenUpdateSlot(), impala::AggregationNode::CodegenUpdateTuple(), impala::PartitionedAggregationNode::CodegenUpdateTuple(), impala::TextConverter::CodegenWriteSlot(), and impala::TupleDescriptor::GenerateLlvmStruct().
|
inline |
Definition at line 77 of file descriptors.h.
References id_.
|
inline |
Definition at line 92 of file descriptors.h.
References is_materialized_.
Referenced by impala::TupleDescriptor::AddSlot(), impala::AggregationNode::CodegenUpdateSlot(), impala::PartitionedAggregationNode::CodegenUpdateSlot(), impala::TupleDescriptor::GenerateLlvmStruct(), impala::Tuple::MaterializeExprs(), impala::SlotRef::Prepare(), impala::UnionNode::Prepare(), impala::DataSourceScanNode::Prepare(), and impala::PrintTuple().
|
inline |
Definition at line 93 of file descriptors.h.
References impala::NullIndicatorOffset::bit_mask, and null_indicator_offset_.
Referenced by impala::AggregationNode::CodegenUpdateSlot(), impala::PartitionedAggregationNode::CodegenUpdateSlot(), and impala::TupleEqualityChecker::operator()().
|
inline |
Definition at line 89 of file descriptors.h.
References null_indicator_offset_.
Referenced by impala::Sorter::Run::CollectNonNullVarSlots(), impala::BufferedTupleStream::ComputeRowSize(), impala::HdfsParquetScanner::CreateColumnReaders(), impala::BufferedTupleStream::DeepCopyInternal(), impala::AggregationNode::FinalizeTuple(), impala::Sorter::Run::GetNext(), impala::BufferedTupleStream::GetNextInternal(), impala::PartitionedAggregationNode::GetOutputTuple(), impala::AggFnEvaluator::Init(), impala::Tuple::MaterializeExprs(), impala::DataSourceScanNode::MaterializeNextRow(), impala::HdfsAvroScanner::MaterializeTuple(), impala::TupleEqualityChecker::operator()(), impala::SlotRef::Prepare(), impala::PrintTuple(), impala::HdfsRCFileScanner::ProcessRange(), impala::HdfsAvroScanner::ResolveSchemas(), impala::AggFnEvaluator::SerializeOrFinalize(), SetAnyVal(), impala::AggFnEvaluator::SetDstSlot(), impala::RawValue::Write(), and impala::TextConverter::WriteSlot().
|
inline |
Definition at line 79 of file descriptors.h.
References parent_.
Referenced by impala::SlotRef::Prepare().
|
inline |
Definition at line 94 of file descriptors.h.
References slot_size_.
Referenced by impala::TextConverter::WriteSlot().
|
inline |
Definition at line 88 of file descriptors.h.
References tuple_offset_.
Referenced by impala::Sorter::Run::CollectNonNullVarSlots(), impala::BufferedTupleStream::ComputeRowSize(), impala::BufferedTupleStream::DeepCopyInternal(), impala::AggregationNode::FinalizeTuple(), impala::TupleDescriptor::GenerateLlvmStruct(), impala::Sorter::Run::GetNext(), impala::BufferedTupleStream::GetNextInternal(), impala::PartitionedAggregationNode::GetOutputTuple(), impala::AggFnEvaluator::Init(), impala::Tuple::MaterializeExprs(), impala::DataSourceScanNode::MaterializeNextRow(), impala::HdfsAvroScanner::MaterializeTuple(), impala::TupleEqualityChecker::operator()(), impala::SlotRef::Prepare(), impala::PrintTuple(), impala::AggFnEvaluator::SerializeOrFinalize(), SetAnyVal(), impala::AggFnEvaluator::SetDstSlot(), impala::RawValue::Write(), impala::TextConverter::WriteSlot(), and impala::HBaseTableScanner::WriteTupleSlot().
|
inline |
Definition at line 78 of file descriptors.h.
References type_.
Referenced by impala::TupleDescriptor::AddSlot(), impala::HdfsAvroScanner::CodegenMaterializeTuple(), impala::AggregationNode::CodegenUpdateSlot(), impala::PartitionedAggregationNode::CodegenUpdateSlot(), impala::AggregationNode::CodegenUpdateTuple(), impala::PartitionedAggregationNode::CodegenUpdateTuple(), impala::HdfsScanner::CodegenWriteCompleteTuple(), impala::TextConverter::CodegenWriteSlot(), impala::HdfsParquetScanner::ColumnReader< T >::ColumnReader(), impala::HdfsParquetScanner::CreateReader(), impala::TupleDescriptor::GenerateLlvmStruct(), impala::Sorter::Run::GetNext(), impala::HBaseTableScanner::GetRowKey(), impala::Tuple::MaterializeExprs(), impala::DataSourceScanNode::MaterializeNextRow(), impala::HdfsAvroScanner::MaterializeTuple(), impala::DataSourceScanNode::Open(), impala::TupleEqualityChecker::operator()(), impala::AggregationNode::Prepare(), impala::AggFnEvaluator::Prepare(), impala::PartitionedAggregationNode::Prepare(), impala::PrintTuple(), impala::HdfsScanner::ReportColumnParseError(), impala::AggFnEvaluator::SerializeOrFinalize(), SetAnyVal(), impala::AggFnEvaluator::SetDstSlot(), impala::HdfsParquetScanner::ValidateColumn(), impala::HdfsAvroScanner::VerifyTypesMatch(), impala::RawValue::Write(), impala::TextConverter::WriteSlot(), impala::HBaseScanNode::WriteTextSlot(), and impala::HBaseTableScanner::WriteTupleSlot().
|
friend |
Definition at line 115 of file descriptors.h.
|
friend |
Definition at line 116 of file descriptors.h.
|
private |
Definition at line 121 of file descriptors.h.
Referenced by col_path(), col_pos(), and DebugString().
|
private |
the idx of the slot in the llvm codegen'd tuple struct this is set by TupleDescriptor during codegen and takes into account leading null bytes.
Definition at line 135 of file descriptors.h.
Referenced by DebugString(), field_idx(), and impala::TupleDescriptor::GenerateLlvmStruct().
|
private |
Definition at line 118 of file descriptors.h.
Referenced by DebugString(), and id().
|
private |
Definition at line 137 of file descriptors.h.
Referenced by is_materialized().
|
private |
Cached codegen'd functions.
Definition at line 140 of file descriptors.h.
Referenced by CodegenIsNull().
|
private |
Definition at line 123 of file descriptors.h.
Referenced by CodegenIsNull(), CodegenUpdateNull(), DebugString(), is_nullable(), and null_indicator_offset().
|
private |
Definition at line 120 of file descriptors.h.
Referenced by parent().
|
private |
Definition at line 141 of file descriptors.h.
Referenced by CodegenUpdateNull().
|
private |
Definition at line 142 of file descriptors.h.
Referenced by CodegenUpdateNull().
|
private |
the idx of the slot in the tuple descriptor (0-based). this is provided by the FE
Definition at line 127 of file descriptors.h.
Referenced by DebugString(), and impala::TupleDescriptor::GenerateLlvmStruct().
|
private |
the byte size of this slot.
Definition at line 130 of file descriptors.h.
Referenced by slot_size().
|
private |
Definition at line 122 of file descriptors.h.
Referenced by DebugString(), and tuple_offset().
|
private |
Definition at line 119 of file descriptors.h.
Referenced by DebugString(), and type().