Fennel: StringDesc Struct Reference (original) (raw)

Support structure for calculating various windowed aggregation functions (COUNT, SUM, AVG, MIN, MAX, FIRST_VALUE, LAST_VALUE) against character data. More...

#include <[WinAggHistogramStrA.h](WinAggHistogramStrA%5F8h-source.html)>

Inheritance diagram for StringDesc:

List of all members.

Public Member Functions
StringDesc ()
~StringDesc ()
StringDesc (StringDesc const &other)
StringDesc & operator= (StringDesc const &other)
void copyFrom (StringDesc const &other)
char * pointer () const
TupleStorageByteLength stringLength () const
bool isNull () const
void setNull ()
Set this TupleDatum to a NULL value.
void copyFrom (TupleDatum const &other)
Copies data from source(shallow copy).
void memCopyFrom (TupleDatum const &other)
Copies data into TupleDatum's private buffer(deep copy).
Public Attributes
TupleStorageByteLength cbStorage
StandardTypeDescriptorOrdinal mType
TupleStorageByteLength cbData
PConstBuffer pData
union {
uint16_t data16
uint32_t data32
uint64_t data64
};

Detailed Description

Support structure for calculating various windowed aggregation functions (COUNT, SUM, AVG, MIN, MAX, FIRST_VALUE, LAST_VALUE) against character data.

Each row entry is held in a tree structure to make finding new min/max functions easy as values are added/removed from the window. Running sum is also kept up to date as rows enter and exit the window.

It is provided as a parameter to all windowed agg support functions.

Version:

Id

//open/dev/fennel/calculator/WinAggHistogramStrA.h#3

Definition at line 54 of file WinAggHistogramStrA.h.


Constructor & Destructor Documentation

| StringDesc::StringDesc | ( | | ) | [inline] | | ---------------------- | - | | - | ---------- |

| StringDesc::~StringDesc | ( | | ) | [inline] | | ------------------------ | - | | - | ---------- |

StringDesc::StringDesc ( StringDesc const & other ) [inline]

Member Function Documentation

void StringDesc::copyFrom ( StringDesc const & other ) [inline]

| char * StringDesc::pointer | ( | | ) | const | | --------------------------- | - | | - | ----- |

| bool TupleDatum::isNull | ( | | ) | const [inline, inherited] | | ----------------------- | - | | - | --------------------------- |

| void TupleDatum::setNull | ( | | ) | [inline, inherited] | | ------------------------ | - | | - | --------------------- |

void TupleDatum::copyFrom ( TupleDatum const & other ) [inline, inherited]
void TupleDatum::memCopyFrom ( TupleDatum const & other ) [inherited]

Copies data into TupleDatum's private buffer(deep copy).

Note:

pData must point to allocated memory before calling this function. If this TupleDatum is part of a TupleDataWithBuffer class, pData will point to valid memory after computeAndAllocate if no memory has been allocated yet, or resetBuffer if computeAndAllocate had previously been called. If this TupleDatum is not part of a TupleDataWithBuffer class, the caller needs to allocate buffer and set up the pData pointer manually.

Upon return, pData might no longer point to allocated memory if the source has a null data pointer.

Parameters:

Definition at line 30 of file TupleData.cpp.

References TupleDatum::cbData, and TupleDatum::pData.

Referenced by ExtremeAggComputer::copyInputToAccumulator(), SumAggComputer< T >::initAccumulator(), ExtremeAggComputer::initAccumulator(), CountNullableAggComputer::initAccumulator(), CountStarAggComputer::initAccumulator(), DynamicParamManager::readParam(), SumAggComputer< T >::updateAccumulator(), ExtremeAggComputer::updateAccumulator(), and DynamicParamManager::writeParam().

00031 { 00032 cbData = other.cbData; 00033 00034
00035 00036 00037 00038 if (other.pData) { 00039 memcpy( 00040 const_cast(pData), 00041 other.pData, 00042 other.cbData); 00043 } else { 00044 pData = other.pData; 00045 } 00046 }


Member Data Documentation

Definition at line 46 of file TupleData.h.

Referenced by RegisterReference::cachePointer(), TupleTest::checkData(), checkEqualStr(), CalcExtStringTest::cmpTupStr(), CalcExtRegExpTest::cmpTupStr(), CalcExtCastTest::cmpTupStr(), UnalignedAttributeAccessor::compressInt64(), TupleDatum::copyFrom(), LbmByteSegment::countBits(), CalcExtDateTimeTest::equals(), LbmSplicerExecStream::execute(), LhxHashGenerator::hashOneColumn(), SumAggComputer< T >::interpretDatum(), CountAggComputer::interpretDatum(), RegisterRef< char * >::length(), TupleTest::loadAndStore8ByteInt(), TupleTest::loadStore2ByteLenData(), TupleTest::loadStoreNullData(), UnalignedAttributeAccessor::loadValue(), TupleAccessor::marshal(), FixedWidthNetworkAccessor64::marshalValueData(), FixedWidthNetworkAccessor32::marshalValueData(), FixedWidthNetworkAccessor16::marshalValueData(), AttributeAccessorImpl::marshalValueData(), TupleDatum::memCopyFrom(), LcsClusterReplaceExecStream::open(), BTreeInsertExecStream::open(), RegisterRef< char * >::pointer(), LbmUnionExecStream::prepare(), LbmSearchExecStream::prepare(), LbmBitOpExecStream::prepare(), LbmEntry::printDatum(), SegBufferWriterExecStream::readReaderRefCount(), RegisterRef< char * >::refer(), CalcAssembler::setTupleDatum(), CalcAssemblerTestCase::setTupleDatum(), LbmSplicerExecStreamTest::spliceInput(), UnalignedAttributeAccessor::storeValue(), stringLength(), LbmLoadBitmapTest::testLoad(), TupleTest::testLoadStoreUnaligned(), ExecStreamTestSuite::testReshapeExecStream(), LbmSearchTest::testScanIdx(), CalcAssemblerTestCase::toLiteralString(), TupleDatum::TupleDatum(), UnalignedAttributeAccessor::uncompressInt64(), VarOffsetAccessor< network >::unmarshalValue(), FixedOffsetVarWidthAccessor< network >::unmarshalValue(), FixedWidthNetworkAccessor64::unmarshalValue(), FixedWidthNetworkAccessor32::unmarshalValue(), FixedWidthNetworkAccessor16::unmarshalValue(), ExtremeAggComputer::updateAccumulator(), TupleTest::writeMaxData(), CalcAssemblerTestCase::writeMaxData(), TupleTest::writeMinData(), CalcAssemblerTestCase::writeMinData(), DynamicParamManager::writeParam(), and TupleTest::writeSampleData().

Definition at line 47 of file TupleData.h.

Referenced by add(), avg(), RegisterReference::cachePointer(), TupleTest::checkData(), checkEqualStr(), RegisterTestInfo< T >::checkTupleDatum(), CalcExtRegExpTest::cmpTupBool(), CalcExtCastTest::cmpTupBool(), CalcExtCastTest::cmpTupDouble(), CalcExtStringTest::cmpTupInt(), CalcExtRegExpTest::cmpTupInt(), CalcExtCastTest::cmpTupInt(), CalcExtCastTest::cmpTupInt64(), CalcExtStringTest::cmpTupNull(), CalcExtRegExpTest::cmpTupNull(), CalcExtCastTest::cmpTupNull(), CalcExtStringTest::cmpTupStr(), CalcExtRegExpTest::cmpTupStr(), CalcExtCastTest::cmpTupStr(), TupleDescriptor::compareTuples(), TupleDescriptor::compareTuplesKey(), UnalignedAttributeAccessor::compressInt64(), SumAggComputer< T >::computeOutput(), ExtremeAggComputer::computeOutput(), TupleDatum::copyFrom(), count(), LbmByteSegment::countBits(), drop(), CalcExtDateTimeTest::equals(), LbmSplicerExecStream::execute(), CalcExecStream::execute(), firstValue(), RegisterReference::getBinding(), BTreeAccessBase::getChildForCurrent(), LhxHashGenerator::hashOneColumn(), histogramAlloc(), CountNullableAggComputer::initAccumulator(), SumAggComputer< T >::interpretDatum(), CountAggComputer::interpretDatum(), TupleDatum::isNull(), RegisterRef< char * >::isNull(), lastValue(), TupleTest::loadAndStore8ByteInt(), TupleTest::loadStore2ByteLenData(), TupleTest::loadStoreNullData(), UnalignedAttributeAccessor::loadValue(), TupleAccessor::marshal(), FixedWidthNetworkAccessor64::marshalValueData(), FixedWidthNetworkAccessor32::marshalValueData(), FixedWidthNetworkAccessor16::marshalValueData(), AttributeAccessorImpl::marshalValueData(), max(), TupleDatum::memCopyFrom(), min(), LcsClusterReplaceExecStream::open(), BTreeInsertExecStream::open(), pointer(), RegisterRef< char * >::pointer(), LbmUnionExecStream::prepare(), LbmSearchExecStream::prepare(), LbmBitOpExecStream::prepare(), LbmEntry::printDatum(), SegBufferWriterExecStream::readReaderRefCount(), RegisterRef< char * >::refer(), RegisterSetBinding::RegisterSetBinding(), TupleDatum::setNull(), CalcAssembler::setTupleDatum(), CalcAssemblerTestCase::setTupleDatum(), RegisterTestInfo< T >::setTupleDatum(), CalcAssemblerTestCase::setTupleDatumNull(), LbmSplicerExecStreamTest::spliceInput(), BTreeWriter::splitCurrentNode(), UnalignedAttributeAccessor::storeValue(), sum(), LbmLoadBitmapTest::testLoad(), TupleTest::testLoadStoreUnaligned(), ExecStreamTestSuite::testReshapeExecStream(), LbmSearchTest::testScanIdx(), CalcAssemblerTestCase::toLiteralString(), RegisterRef< char * >::toNull(), TupleDatum::TupleDatum(), tupleFiddle(), UnalignedAttributeAccessor::uncompressInt64(), AttributeAccessorImpl::unmarshalNullableValue(), BitAccessor::unmarshalValue(), VarOffsetAccessor< network >::unmarshalValue(), FixedOffsetVarWidthAccessor< network >::unmarshalValue(), FixedWidthNetworkAccessor64::unmarshalValue(), FixedWidthNetworkAccessor32::unmarshalValue(), FixedWidthNetworkAccessor16::unmarshalValue(), FixedWidthAccessor::unmarshalValue(), SumAggComputer< T >::updateAccumulator(), ExtremeAggComputer::updateAccumulator(), CountNullableAggComputer::updateAccumulator(), RegisterRef< char * >::value(), WinAggAddTest(), WinAggAddTestStr(), WinAggDropTest(), WinAggDropTestStr(), TupleTest::writeMaxData(), CalcAssemblerTestCase::writeMaxData(), TupleTest::writeMinData(), CalcAssemblerTestCase::writeMinData(), DynamicParamManager::writeParam(), and TupleTest::writeSampleData().

union { ... } [inherited]


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


Generated on Mon Jun 22 04:00:47 2009 for Fennel by doxygen 1.5.1