Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <desc-tbl-builder.h>
Public Member Functions | |
DescriptorTblBuilder (ObjectPool *object_pool) | |
TupleDescBuilder & | DeclareTuple () |
DescriptorTbl * | Build () |
Private Attributes | |
ObjectPool * | obj_pool_ |
Owned by caller. More... | |
std::vector< TupleDescBuilder * > | tuples_descs_ |
Aids in the construction of a DescriptorTbl by declaring tuples and slots associated with those tuples. TupleIds are monotonically increasing from 0 for each DeclareTuple, and SlotIds increase similarly, but are always greater than all TupleIds. Unlike FE, slots are not reordered based on size, and padding is not addded. Example usage: DescriptorTblBuilder builder; builder.DeclareTuple() << TYPE_TINYINT << TYPE_TIMESTAMP; // gets TupleId 0 builder.DeclareTuple() << TYPE_FLOAT; // gets TupleId 1 DescriptorTbl desc_tbl = builder.Build();
Definition at line 36 of file desc-tbl-builder.h.
impala::DescriptorTblBuilder::DescriptorTblBuilder | ( | ObjectPool * | object_pool | ) |
Definition at line 25 of file desc-tbl-builder.cc.
DescriptorTbl * impala::DescriptorTblBuilder::Build | ( | ) |
Definition at line 59 of file desc-tbl-builder.cc.
References impala::BitUtil::Ceil(), impala::DescriptorTbl::Create(), impala::MakeSlotDescriptor(), impala::MakeTupleDescriptor(), obj_pool_, impala::Status::ok(), tuples_descs_, impala::TYPE_STRING, and impala::TYPE_VARCHAR.
Referenced by impala::SimpleTupleStreamTest::CreateDescriptors(), impala::SimpleNullStreamTest::CreateDescriptors(), impala::MultiTupleStreamTest::CreateDescriptors(), impala::MultiNullableTupleStreamTest::CreateDescriptors(), and impala::RowBatchListTest::SetUp().
TupleDescBuilder & impala::DescriptorTblBuilder::DeclareTuple | ( | ) |
Definition at line 28 of file desc-tbl-builder.cc.
References impala::ObjectPool::Add(), obj_pool_, and tuples_descs_.
Referenced by impala::SimpleTupleStreamTest::CreateDescriptors(), impala::SimpleNullStreamTest::CreateDescriptors(), impala::MultiTupleStreamTest::CreateDescriptors(), impala::MultiNullableTupleStreamTest::CreateDescriptors(), and impala::RowBatchListTest::SetUp().
|
private |
Owned by caller.
Definition at line 45 of file desc-tbl-builder.h.
Referenced by Build(), and DeclareTuple().
|
private |
Definition at line 47 of file desc-tbl-builder.h.
Referenced by Build(), and DeclareTuple().