Fennel: ExecStreamFactory Class Reference (original) (raw)
ExecStreamFactory builds an ExecStreamEmbryo from the Java representation of a stream definition. More...
#include <[ExecStreamFactory.h](ExecStreamFactory%5F8h-source.html)>
Inheritance diagram for ExecStreamFactory:

Detailed Description
ExecStreamFactory builds an ExecStreamEmbryo from the Java representation of a stream definition.
NOTE: this class is not thread-safe
Definition at line 58 of file ExecStreamFactory.h.
Constructor & Destructor Documentation
Member Function Documentation
Reimplemented from FemVisitor.
Definition at line 504 of file ExecStreamFactory.cpp.
References createPrivateScratchSegment(), ExternalSortExecStreamParams::descendingKeyColumns, ExternalSortExecStreamParams::distinctness, DUP_ALLOW, ExternalSortExecStreamParams::earlyClose, embryo, ExternalSortExecStreamParams::estimatedNumRows, getDatabase(), ProxySortingStreamDef::getDescendingProj(), ProxySortingStreamDef::getDistinctness(), ProxySortingStreamDef::getEstimatedNumRows(), ProxyKeyAccessorDef::getKeyProj(), implementSortWithBTree(), ExecStreamEmbryo::init(), ProxySortingStreamDef::isEarlyClose(), ExternalSortExecStreamParams::keyProj, ExternalSortExecStream::newExternalSortExecStream(), pDatabase, ExternalSortExecStreamParams::pTempSegment, CmdInterpreter::readTupleProjection(), readTupleStreamParams(), and ExternalSortExecStreamParams::storeFinalRun.
Reimplemented from FemVisitor.
Definition at line 366 of file ExecStreamFactory.cpp.
References ValuesExecStreamParams::bufSize, JniUtil::classRhBase64, embryo, FixedBuffer, ExecStreamEmbryo::init(), JniProxy::jObject, ProxyValuesStreamDef::meth_getTupleBytesBase64, JniUtil::methBase64Decode, JniProxy::pEnv, ValuesExecStreamParams::pTupleBuffer, and readTupleStreamParams().
Reimplemented from FemVisitor.
Definition at line 391 of file ExecStreamFactory.cpp.
References JniUtil::classRhBase64, COMP_NOOP, ReshapeExecStreamParams::compOp, ReshapeExecStreamParams::dynamicParameters, embryo, FixedBuffer, ProxyReshapeStreamDef::getCompareOp(), ProxyReshapeStreamDef::getInputCompareProjection(), ProxyReshapeStreamDef::getOutputProjection(), ProxyReshapeStreamDef::getReshapeParameter(), ExecStreamEmbryo::init(), ReshapeExecStreamParams::inputCompareProj, JniProxy::jObject, MAXU, ProxyReshapeStreamDef::meth_getTupleCompareBytesBase64, JniUtil::methBase64Decode, ReshapeExecStreamParams::outputProj, ReshapeExecStreamParams::pCompTupleBuffer, JniProxy::pEnv, CmdInterpreter::readTupleProjection(), and readTupleStreamParams().
00392 {
00393 ReshapeExecStreamParams params;
00394 readTupleStreamParams(params, streamDef);
00395
00396 params.compOp = streamDef.getCompareOp();
00397 if (params.compOp != COMP_NOOP) {
00398
00399 jobject tupleBytesBase64 = streamDef.pEnv->CallObjectMethod(
00400 streamDef.jObject,
00401 ProxyReshapeStreamDef::meth_getTupleCompareBytesBase64);
00402
00403
00404 jbyteArray jbytes = (jbyteArray) streamDef.pEnv->CallStaticObjectMethod(
00405 JniUtil::classRhBase64,
00406 JniUtil::methBase64Decode,
00407 tupleBytesBase64);
00408
00409
00410 int bufSize = streamDef.pEnv->GetArrayLength(jbytes);
00411 params.pCompTupleBuffer.reset(new FixedBuffer[bufSize]);
00412 streamDef.pEnv->GetByteArrayRegion(
00413 jbytes, 0, bufSize,
00414 reinterpret_cast<jbyte *>(params.pCompTupleBuffer.get()));
00415
00416 CmdInterpreter::readTupleProjection(
00417 params.inputCompareProj, streamDef.getInputCompareProjection());
00418 }
00419
00420 CmdInterpreter::readTupleProjection(
00421 params.outputProj, streamDef.getOutputProjection());
00422
00423 SharedProxyReshapeParameter dynamicParam = streamDef.getReshapeParameter();
00424 for (; dynamicParam; ++dynamicParam) {
00425 int offset = dynamicParam->getCompareOffset();
00426 ReshapeParameter reshapeParam(
00427 DynamicParamId(dynamicParam->getDynamicParamId()),
00428 (offset < 0) ? MAXU : uint(offset),
00429 dynamicParam->isOutputParam());
00430 params.dynamicParameters.push_back(reshapeParam);
00431 }
00432
00433 embryo.init(new ReshapeExecStream(), params);
00434 }
Reimplemented from FemVisitor.
Definition at line 553 of file ExecStreamFactory.cpp.
References FlatFileExecStreamParams::calcProgram, FlatFileExecStreamParams::columnNames, FlatFileExecStreamParams::dataFilePath, embryo, FlatFileExecStreamParams::errorFilePath, FlatFileExecStreamParams::escapeChar, FlatFileExecStreamParams::fieldDelim, FLATFILE_MODE_DESCRIBE, FLATFILE_MODE_QUERY_TEXT, FLATFILE_MODE_SAMPLE, ProxyFlatFileTupleStreamDef::getCalcProgram(), ProxyFlatFileTupleStreamDef::getDataFilePath(), ProxyFlatFileTupleStreamDef::getErrorFilePath(), ProxyFlatFileTupleStreamDef::getEscapeCharacter(), ProxyFlatFileTupleStreamDef::getFieldDelimiter(), ProxyFlatFileTupleStreamDef::getNumRowsScan(), ProxyFlatFileTupleStreamDef::getQuoteCharacter(), ProxyFlatFileTupleStreamDef::getRowDelimiter(), FlatFileExecStreamParams::header, ExecStreamEmbryo::init(), ProxyFlatFileTupleStreamDef::isHasHeader(), ProxyFlatFileTupleStreamDef::isLenient(), ProxyFlatFileTupleStreamDef::isMapped(), ProxyFlatFileTupleStreamDef::isTrim(), FlatFileExecStreamParams::lenient, FlatFileExecStreamParams::mapped, FlatFileExecStreamParams::mode, FlatFileExecStream::newFlatFileExecStream(), FlatFileExecStreamParams::numRowsScan, FlatFileExecStreamParams::quoteChar, readCharParam(), readColumnList(), readTupleStreamParams(), FlatFileExecStreamParams::rowDelim, and FlatFileExecStreamParams::trim.
Reimplemented from FemVisitor.
Definition at line 583 of file ExecStreamFactory.cpp.
References LhxJoinExecStreamParams::cndKeys, createPrivateScratchSegment(), embryo, LhxJoinExecStreamParams::enableJoinFilter, LhxJoinExecStreamParams::enableSubPartStat, LhxJoinExecStreamParams::enableSwing, LhxJoinExecStreamParams::filterNullKeyProj, LhxJoinExecStreamParams::forcePartitionLevel, ProxyLhxJoinStreamDef::getCndBuildKeys(), getDatabase(), ProxyLhxJoinStreamDef::getFilterNullProj(), ProxyLhxJoinStreamDef::getLeftKeyProj(), ProxyLhxJoinStreamDef::getNumBuildRows(), ProxyLhxJoinStreamDef::getRightKeyProj(), ExecStreamEmbryo::init(), ProxyLhxJoinStreamDef::isLeftInner(), ProxyLhxJoinStreamDef::isLeftOuter(), ProxyLhxJoinStreamDef::isRightInner(), ProxyLhxJoinStreamDef::isRightOuter(), ProxyLhxJoinStreamDef::isSetopAll(), ProxyLhxJoinStreamDef::isSetopDistinct(), LhxJoinExecStreamParams::leftInner, LhxJoinExecStreamParams::leftKeyProj, LhxJoinExecStreamParams::leftOuter, LhxJoinExecStreamParams::numRows, pDatabase, LhxJoinExecStreamParams::pTempSegment, CmdInterpreter::readTupleProjection(), readTupleStreamParams(), LhxJoinExecStreamParams::rightInner, LhxJoinExecStreamParams::rightKeyProj, LhxJoinExecStreamParams::rightOuter, LhxJoinExecStreamParams::setopAll, and LhxJoinExecStreamParams::setopDistinct.
Reimplemented from FemVisitor.
Definition at line 638 of file ExecStreamFactory.cpp.
References LhxAggExecStreamParams::cndGroupByKeys, createPrivateScratchSegment(), embryo, LhxAggExecStreamParams::enableSubPartStat, LhxAggExecStreamParams::forcePartitionLevel, ProxyLhxAggStreamDef::getCndGroupByKeys(), getDatabase(), ProxyLhxAggStreamDef::getNumRows(), ExecStreamEmbryo::init(), LhxAggExecStreamParams::numRows, pDatabase, LhxAggExecStreamParams::pTempSegment, and readAggStreamParams().
Definition at line 737 of file ExecStreamFactory.cpp.
References ANON_PAGE_OWNER_ID, ProxyTableWriterDef::getIndexWriter(), FtrsTableWriterParams::indexParams, FtrsTableWriterExecStreamParams::pActionMutex, pDatabase, pTableWriterFactory, FtrsTableWriterExecStreamParams::pTableWriterFactory, readIndexWriterParams(), CmdInterpreter::readTupleProjection(), readTupleStreamParams(), and FtrsTableWriterParams::tableId.
Referenced by visit().
| char ExecStreamFactory::readCharParam | ( | const std::string & | val | ) | [protected] |
|---|
Definition at line 544 of file ExecStreamFactory.cpp.
Referenced by visit().
00545 { 00546 assert(val.size() <= 1); 00547 if (val.size() == 0) { 00548 return 0; 00549 } 00550 return val.at(0); 00551 }
| void ExecStreamFactory::setScratchAccessor | ( | SegmentAccessor & | scratchAccessor | ) |
|---|
| void ExecStreamFactory::createPrivateScratchSegment | ( | ExecStreamParams & | params | ) |
|---|
Definition at line 776 of file ExecStreamFactory.cpp.
References ANON_PAGE_OWNER_ID, ProxyIndexAccessorDef::getIndexId(), ProxyKeyAccessorDef::getKeyProj(), ProxyIndexAccessorDef::getRootPageId(), ProxyIndexAccessorDef::getRootPageIdParamId(), ProxyIndexAccessorDef::getSegmentId(), ProxyIndexAccessorDef::getTupleDesc(), ProxyIndexAccessorDef::isReadOnlyCommittedData(), BTreeParams::keyProj, NULL_PAGE_ID, BTreeParams::pageOwnerId, pDatabase, CmdInterpreter::StreamGraphHandle::pReadCommittedSegment, BTreeParams::pRootMap, CmdInterpreter::StreamGraphHandle::pSegment, BTreeParams::pSegment, pStreamGraphHandle, readDynamicParamId(), readTupleDescriptor(), CmdInterpreter::readTupleProjection(), BTreeParams::rootPageId, BTreeParams::rootPageIdParamId, BTreeParams::segmentId, Database::TEMP_SEGMENT_ID, and BTreeParams::tupleDesc.
Referenced by readBTreeStreamParams(), and ExecStreamSubFactory_lu::visit().
Definition at line 854 of file ExecStreamFactory.cpp.
References ProxyIndexSearchDef::getInputDirectiveProj(), ProxyIndexSearchDef::getInputJoinProj(), ProxyIndexSearchDef::getInputKeyProj(), ProxyIndexSearchDef::getSearchKeyParameter(), BTreeSearchExecStreamParams::inputDirectiveProj, BTreeSearchExecStreamParams::inputJoinProj, BTreeSearchExecStreamParams::inputKeyProj, ProxyIndexSearchDef::isOuterJoin(), BTreeSearchExecStreamParams::outerJoin, readBTreeReadStreamParams(), CmdInterpreter::readTupleProjection(), and BTreeSearchExecStreamParams::searchKeyParams.
Referenced by initBTreePrefetchSearchParams(), and visit().
| DynamicParamId ExecStreamFactory::readDynamicParamId | ( | const int | val | ) |
|---|
| virtual void FemVisitor::visit | ( | ProxyBeginTxnCmd & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | ------------------------------------------------ | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyCmd & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | -------------------------------- | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyCmdBeginTxn & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | ------------------------------------------------ | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyCmdCommit & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | -------------------------------------------- | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyCmdRollback & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | ------------------------------------------------ | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyCmdSetParam & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | ------------------------------------------------ | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyColumnName & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | ---------------------------------------------- | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyCorrelation & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | ------------------------------------------------ | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyCsnHandle & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | -------------------------------------------- | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyDatabaseCmd & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | ------------------------------------------------ | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyDbHandle & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | ------------------------------------------ | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyEndTxnCmd & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | -------------------------------------------- | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyHandle & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | -------------------------------------- | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyIndexCmd & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | ------------------------------------------ | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxySvptHandle & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | ---------------------------------------------- | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyTxnCmd & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | -------------------------------------- | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyTxnHandle & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | -------------------------------------------- | | - | ------------------------------ |
| virtual void FemVisitor::visit | ( | ProxyWindowDef & | | ) | [inline, virtual, inherited] | | ------------------------------ | - | -------------------------------------------- | | - | ------------------------------ |
| void JniProxyVisitor::unhandledVisit | ( | | ) | [virtual, inherited] | | ------------------------------------ | - | | - | ---------------------- |
Handles case when a visitor attempts to visit a proxy whose type's visit method has not been overridden.
Default action is to throw an assertion failure; subclasses may override to ignore or whatever.
Reimplemented in ExecStreamSubFactory_lu.
Definition at line 50 of file JniProxy.cpp.
Referenced by FemVisitor::visit().
00051 { 00052 permAssert(false); 00053 }
Member Data Documentation
The documentation for this class was generated from the following files:
- /home/pub/open/dev/fennel/farrago/ExecStreamFactory.h
- /home/pub/open/dev/fennel/farrago/ExecStreamFactory.cpp
