#include <TupleDataWithBuffer.h>
Inheritance diagram for TupleDataWithBuffer:
Public Member Functions | |
TupleDataWithBuffer () | |
TupleDataWithBuffer (TupleDescriptor const &tupleDesc) | |
void | computeAndAllocate (TupleDescriptor const &tupleDesc) |
void | resetBuffer () |
~TupleDataWithBuffer () | |
void | compute (TupleDescriptor const &) |
bool | containsNull () const |
bool | containsNull (TupleProjection const &tupleProj) const |
void | projectFrom (TupleData const &src, TupleProjection const &) |
project unmarshalled data; like TupleDescriptor::projectFrom | |
Private Attributes | |
TupleAccessor | tupleAccessor |
boost::scoped_array< FixedBuffer > | array |
A common use is to create an input and output tuple for Calculator given the TupleDescriptor obtained from Calculator::getOutputRegisterDescriptor and from Calculator::getInputRegisterDescriptor()
Definition at line 43 of file TupleDataWithBuffer.h.
TupleDataWithBuffer::TupleDataWithBuffer | ( | ) | [explicit] |
TupleDataWithBuffer::TupleDataWithBuffer | ( | TupleDescriptor const & | tupleDesc | ) | [explicit] |
Definition at line 32 of file TupleDataWithBuffer.cpp.
References computeAndAllocate().
00033 { 00034 computeAndAllocate(tupleDesc); 00035 }
TupleDataWithBuffer::~TupleDataWithBuffer | ( | ) |
void TupleDataWithBuffer::computeAndAllocate | ( | TupleDescriptor const & | tupleDesc | ) |
Definition at line 37 of file TupleDataWithBuffer.cpp.
References array, TupleData::compute(), TupleAccessor::compute(), FixedBuffer, TupleAccessor::getMaxByteCount(), TupleAccessor::setCurrentTupleBuf(), TUPLE_FORMAT_ALL_FIXED, tupleAccessor, and TupleAccessor::unmarshal().
Referenced by LcsHash::init(), LhxHashTable::init(), LcsClusterReplaceExecStream::initTupleLoadParams(), CalcExtWinAggFuncTest::initWindowedAggDataBlock(), LcsCompareColKeyUsingOffsetIndex::LcsCompareColKeyUsingOffsetIndex(), LcsRowScanExecStream::prepare(), LbmSplicerExecStream::prepare(), LbmMinusExecStream::prepare(), LbmGeneratorExecStream::prepare(), SortedAggExecStream::prepare(), LcsRowScanExecStream::prepareResidualFilters(), and TupleDataWithBuffer().
00038 { 00039 tupleAccessor.compute(tupleDesc, TUPLE_FORMAT_ALL_FIXED); 00040 array.reset(new FixedBuffer[tupleAccessor.getMaxByteCount()]); 00041 tupleAccessor.setCurrentTupleBuf(array.get(), false); 00042 compute(tupleDesc); 00043 tupleAccessor.unmarshal(*this); 00044 }
void TupleDataWithBuffer::resetBuffer | ( | ) |
Definition at line 46 of file TupleDataWithBuffer.cpp.
References tupleAccessor, and TupleAccessor::unmarshal().
Referenced by LhxHashTable::addKeyData(), LhxHashTable::aggData(), LbmMinusExecStream::copyPrefix(), SortedAggExecStream::copyPrevGroupByKey(), LcsRowScanExecStream::execute(), LcsColumnReader::findVal(), LbmGeneratorExecStream::generateBitmaps(), LbmGeneratorExecStream::generateMultiKeyBitmaps(), LbmGeneratorExecStream::generateSingletons(), LbmSplicerExecStream::getValidatedTuple(), LcsCompareColKeyUsingOffsetIndex::lessThan(), LcsClusterReplaceExecStream::readOrigClusterRow(), and LcsHash::search().
00047 { 00048 // reset data pointers to the associated buffer. 00049 tupleAccessor.unmarshal(*this); 00050 }
void TupleData::compute | ( | TupleDescriptor const & | ) | [inherited] |
Definition at line 48 of file TupleData.cpp.
Referenced by BTreeReader::BTreeReader(), BTreeReadersTest::BTreeReadersTest(), BTreeTest::BTreeTest(), BTreeVerifier::BTreeVerifier(), computeAndAllocate(), LhxPlan::createChildren(), FtrsTableWriter::createIndexWriter(), LbmEntryDump::dump(), LhxAggExecStream::execute(), ExternalSortMerger::ExternalSortMerger(), ExternalSortRunLoader::ExternalSortRunLoader(), FtrsTableWriter::FtrsTableWriter(), LhxPlan::generatePartitions(), LbmSplicerExecStreamTest::generateRidInput(), LbmSplicerExecStreamTest::generateTupleInput(), LbmSegmentWriter::init(), LbmDeletionIndexReader::init(), LbmEntry::init(), LhxHashTable::init(), LhxHashKeyAccessor::init(), LhxHashDataAccessor::init(), ReshapeExecStream::initCompareData(), LbmSearchTest::initEqualSearch(), LbmExecStreamTestBase::initKeyBitmap(), LcsClusterReplaceExecStream::initTupleLoadParams(), LcsClusterAppendExecStream::initTupleLoadParams(), LcsClusterAccessBase::LcsClusterAccessBase(), FlatFileExecStreamImpl::logError(), BTreeNodeAccessor::onInit(), LhxPartitionWriter::open(), MockConsumerExecStream::open(), CollectExecStream::open(), LbmSplicerExecStream::postViolation(), LcsRowScanExecStream::prepare(), LcsClusterAppendExecStream::prepare(), LbmUnionExecStream::prepare(), LbmSplicerExecStream::prepare(), LbmSearchExecStream::prepare(), LbmNormalizerExecStream::prepare(), LbmMinusExecStream::prepare(), LbmGeneratorExecStream::prepare(), LbmChopperExecStream::prepare(), LhxJoinExecStream::prepare(), LhxAggExecStream::prepare(), FtrsTableWriterExecStream::prepare(), BTreeSearchExecStream::prepare(), BTreeReadExecStream::prepare(), BTreePrefetchSearchExecStream::prepare(), FlatFileExecStreamImpl::prepare(), UncollectExecStream::prepare(), SortedAggExecStream::prepare(), SegBufferWriterExecStream::prepare(), SegBufferReaderExecStream::prepare(), ReshapeExecStream::prepare(), MockResourceExecStream::prepare(), MockProducerExecStream::prepare(), CorrelationJoinExecStream::prepare(), CartesianJoinExecStream::prepare(), BernoulliSamplingExecStream::prepare(), BarrierExecStream::prepare(), CalcExecStream::prepare(), LhxHashTableTest::readPartition(), TestCalculator::setUp(), ExecStreamTestSuite::testBTreeInsertExecStream(), BTreeTest::testBulkLoad(), ExecStreamTestSuite::testCartesianJoinExecStream(), LbmExecStreamTestBase::testCaseSetUp(), CalcExecStreamTestSuite::testConstant(), ExecStreamTestSuite::testCopyExecStream(), ExecStreamGovernorTest::testGovernor(), LhxHashTableTest::testInsert(), BTreeTest::testInserts(), LbmEntryTest::testldb35(), LbmEntryTest::testler5920(), LbmSplicerExecStreamTest::testLER5968(), LbmSplicerExecStreamTest::testLER6473(), LbmEntryTest::testMergeEntry(), ExecStreamTestSuite::testMergeExecStream(), ExecStreamTestSuite::testMergeImplicitPullInputs(), LbmEntryTest::testMergeSingleton(), BTreeTest::testMultiKeySearches(), BTreeReadersTest::testReaders(), ExecStreamTestSuite::testReshapeExecStream(), ExecStreamTestSuite::testSegBufferExecStream(), ExecStreamTestSuite::testSegBufferReaderWriterExecStream(), LbmSplicerExecStreamTest::testSpliceRids(), LbmSplicerExecStreamTest::testSpliceWithKeys(), LbmEntryTest::testZeroBytes(), LhxHashKeyAccessor::toString(), TupleData::TupleData(), ExecStreamUnitTestBase::verifyBufferedOutput(), ExecStreamUnitTestBase::verifyConstantOutput(), FlatFileExecStreamTest::verifyOutput(), ExecStreamUnitTestBase::verifyOutput(), and LhxHashTableTest::writeHashTable().
00049 { 00050 clear(); 00051 for (uint i = 0; i < tupleDesc.size(); ++i) { 00052 TupleDatum datum; 00053 datum.cbData = tupleDesc[i].cbStorage; 00054 push_back(datum); 00055 } 00056 }
bool TupleData::containsNull | ( | ) | const [inherited] |
Definition at line 58 of file TupleData.cpp.
Referenced by LhxHashTable::addTuple(), LhxJoinExecStream::execute(), BTreeWriter::insertTupleFromBuffer(), and BTreeSearchExecStream::searchForKey().
00059 { 00060 for (uint i = 0; i < size(); ++i) { 00061 if (!(*this)[i].pData) { 00062 return true; 00063 } 00064 } 00065 return false; 00066 }
bool TupleData::containsNull | ( | TupleProjection const & | tupleProj | ) | const [inherited] |
Definition at line 68 of file TupleData.cpp.
00069 { 00070 for (uint i = 0; i < tupleProj.size(); ++i) { 00071 if (!(*this)[tupleProj[i]].pData) { 00072 return true; 00073 } 00074 } 00075 return false; 00076 }
void TupleData::projectFrom | ( | TupleData const & | src, | |
TupleProjection const & | ||||
) | [inherited] |
project unmarshalled data; like TupleDescriptor::projectFrom
Definition at line 78 of file TupleData.cpp.
Referenced by LhxHashTable::addData(), LhxHashTable::addKeyData(), LcsRowScanExecStream::execute(), and LhxHashKeyAccessor::matches().
00081 { 00082 clear(); 00083 for (uint i = 0; i < projection.size(); ++i) { 00084 push_back(src[projection[i]]); 00085 } 00086 }
Definition at line 53 of file TupleDataWithBuffer.h.
Referenced by computeAndAllocate(), and resetBuffer().
boost::scoped_array<FixedBuffer> TupleDataWithBuffer::array [private] |