LhxHashBase.h

Go to the documentation of this file.
00001 /*
00002 // $Id: //open/dev/fennel/hashexe/LhxHashBase.h#1 $
00003 // Fennel is a library of data storage and processing components.
00004 // Copyright (C) 2006-2009 The Eigenbase Project
00005 // Copyright (C) 2009-2009 SQLstream, Inc.
00006 // Copyright (C) 2006-2009 LucidEra, Inc.
00007 //
00008 // This program is free software; you can redistribute it and/or modify it
00009 // under the terms of the GNU General Public License as published by the Free
00010 // Software Foundation; either version 2 of the License, or (at your option)
00011 // any later version approved by The Eigenbase Project.
00012 //
00013 // This program is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 // GNU General Public License for more details.
00017 //
00018 // You should have received a copy of the GNU General Public License
00019 // along with this program; if not, write to the Free Software
00020 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 */
00022 
00023 #ifndef Fennel_LhxHashBase_Included
00024 #define Fennel_LhxHashBase_Included
00025 
00026 #include "fennel/segment/SegmentAccessor.h"
00027 
00028 using namespace std;
00029 
00030 // REVIEW jvs 25-Aug-2006:  This file should be named LhxHashInfo.h, right?
00031 
00032 FENNEL_BEGIN_NAMESPACE
00033 
00034 enum LhxHashTrim
00035 {
00036     HASH_TRIM_NONE,
00037     HASH_TRIM_VARCHAR,
00038     HASH_TRIM_UNICODE_VARCHAR
00039 };
00040 
00047 struct LhxHashInfo
00048 {
00049     // REVIEW jvs 25-Aug-2006:  This shouldn't be a doxygen comment since
00050     // it's not associated with any field.  Seems like the second sentence
00051     // is out-of-date.
00061     SegmentAccessor externalSegmentAccessor;
00062 
00066     SegmentAccessor memSegmentAccessor;
00067 
00073     uint numCachePages;
00074 
00075     // REVIEW jvs 25-Aug-2006:  Instead of ten vectors of types, it's
00076     // cleaner to create one struct (say LhxHashInputInfo) containing
00077     // all the types as fields, and then just create one
00078     // vector<LhxHashInputInfo>.  Access is then info.input[i].useJoinFilter
00079     // rather than info.useJoinFilter[i].
00080 
00081     // REVIEW jvs 25-Aug-2006:  Why is this named inputDesc?  Isn't
00082     // it really output?  For example, LhxAggExecStream::prepare
00083     // sets outputDesc = inputDesc.
00092     vector<TupleDescriptor> inputDesc;
00093 
00094     vector<TupleProjection> keyProj;
00095 
00096     /*
00097      * If a key column is varchar type.
00098      */
00099     vector< vector<LhxHashTrim> > isKeyColVarChar;
00100 
00101     /*
00102      * In hash join, if an input can be filtered using bitmap saved from
00103      * previous round of partitioning.
00104      */
00105     vector<bool> useJoinFilter;
00106 
00110     TupleProjection aggsProj;
00111     vector<TupleProjection> dataProj;
00112 
00116     vector<RecordNum> numRows;
00117 
00124     vector<RecordNum> cndKeys;
00125 
00129     vector<SharedExecStreamBufAccessor> streamBufAccessor;
00130 
00143     vector<bool> filterNull;
00144     vector<TupleProjection> filterNullKeyProj;
00145     vector<bool> removeDuplicate;
00146 };
00147 
00148 FENNEL_END_NAMESPACE
00149 
00150 #endif
00151 
00152 // End LhxHashBase.h

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