#include <WinAggHistogramStrA.h>
Inheritance diagram for StringDesc:
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 | |
}; |
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.
Definition at line 54 of file WinAggHistogramStrA.h.
StringDesc::StringDesc | ( | ) | [inline] |
StringDesc::~StringDesc | ( | ) | [inline] |
StringDesc::StringDesc | ( | StringDesc const & | other | ) | [inline] |
Definition at line 62 of file WinAggHistogramStrA.h.
References copyFrom().
00063 { 00064 copyFrom(other); 00065 }
StringDesc& StringDesc::operator= | ( | StringDesc const & | other | ) | [inline] |
Definition at line 67 of file WinAggHistogramStrA.h.
References copyFrom().
00068 { 00069 copyFrom(other); 00070 return *this; 00071 }
void StringDesc::copyFrom | ( | StringDesc const & | other | ) | [inline] |
Definition at line 74 of file WinAggHistogramStrA.h.
References cbStorage, TupleDatum::copyFrom(), and mType.
Referenced by operator=(), and StringDesc().
00075 { 00076 TupleDatum::copyFrom(other); 00077 cbStorage = other.cbStorage; 00078 mType = other.mType; 00079 }
char * StringDesc::pointer | ( | ) | const |
Definition at line 31 of file WinAggHistogramStrA.cpp.
References StandardTypeDescriptor::isArray(), mType, and TupleDatum::pData.
Referenced by WinAggHistogramStrA::setReturnReg().
00032 { 00033 assert(StandardTypeDescriptor::isArray(mType)); 00034 assert(pData); 00035 return reinterpret_cast<char*>(const_cast<PBuffer>(pData)); 00036 }
TupleStorageByteLength StringDesc::stringLength | ( | ) | const |
Definition at line 39 of file WinAggHistogramStrA.cpp.
References TupleDatum::cbData, cbStorage, StandardTypeDescriptor::isArray(), StandardTypeDescriptor::isVariableLenArray(), and mType.
Referenced by WinAggHistogramStrA::setReturnReg().
00040 { 00041 assert(StandardTypeDescriptor::isArray(mType)); 00042 return (StandardTypeDescriptor::isVariableLenArray(mType)) ? 00043 cbData : cbStorage; 00044 }
bool TupleDatum::isNull | ( | ) | const [inline, inherited] |
Definition at line 150 of file TupleData.h.
References TupleDatum::pData.
00151 { 00152 return (!pData); 00153 }
void TupleDatum::setNull | ( | ) | [inline, inherited] |
Set this TupleDatum to a NULL value.
Definition at line 155 of file TupleData.h.
References TupleDatum::pData.
00156 { 00157 pData = NULL; 00158 }
void TupleDatum::copyFrom | ( | TupleDatum const & | other | ) | [inline, inherited] |
Copies data from source(shallow copy).
[in] | other | the source TupleDatum |
Definition at line 166 of file TupleData.h.
References TupleDatum::cbData, and TupleDatum::pData.
Referenced by copyFrom(), TupleDatum::operator=(), TupleDatum::TupleDatum(), CountNullableAggComputer::updateAccumulator(), and CountStarAggComputer::updateAccumulator().
void TupleDatum::memCopyFrom | ( | TupleDatum const & | other | ) | [inherited] |
Copies data into TupleDatum's private buffer(deep copy).
[in] | other | the source TupleDatum |
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 * Performs memcpy from "other". 00036 * Sets pData to NULL if it is NULL in "other". 00037 */ 00038 if (other.pData) { 00039 memcpy( 00040 const_cast<PBuffer>(pData), 00041 other.pData, 00042 other.cbData); 00043 } else { 00044 pData = other.pData; 00045 } 00046 }
Definition at line 57 of file WinAggHistogramStrA.h.
Referenced by copyFrom(), pointer(), and stringLength().
TupleStorageByteLength TupleDatum::cbData [inherited] |
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().
PConstBuffer TupleDatum::pData [inherited] |
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().
uint16_t TupleDatum::data16 [inherited] |
Definition at line 51 of file TupleData.h.
Referenced by FixedWidthNetworkAccessor16::unmarshalValue().
uint32_t TupleDatum::data32 [inherited] |
Definition at line 52 of file TupleData.h.
Referenced by FixedWidthNetworkAccessor32::unmarshalValue().
uint64_t TupleDatum::data64 [inherited] |
Definition at line 53 of file TupleData.h.
Referenced by FixedWidthNetworkAccessor64::unmarshalValue().
union { ... } [inherited] |