join.h
Go to the documentation of this file.
00001 // File: $Id$
00002 // Author: John Wu <John.Wu at ACM.org>
00003 // Copyright 2008-2012 the Regents of the University of California
00004 #ifndef IBIS_JOIN_H
00005 #define IBIS_JOIN_H
00006 
00013 #include "table.h"      // public data types used by FastBit
00014 #include "part.h"       // ibis::part
00015 
00016 namespace ibis {
00017     class join; // forward definition
00018 } // namespace ibis
00019 
00031 class ibis::join {
00032 public:
00040     static join* create(const ibis::part& partr, const ibis::part& parts,
00041                         const char* colname, const char* condr = 0,
00042                         const char* conds = 0);
00043 
00047     virtual void estimate(uint64_t& nmin, uint64_t& nmax) =0;
00051     virtual int64_t evaluate() =0;
00052 
00060     virtual table* select(const std::vector<const char*>& colnames) =0;
00061 
00062     virtual ~join() {};
00063 
00064     template <typename T>
00065     static table*
00066     fillEquiJoinTable(size_t nrows,
00067                       const std::string &desc,
00068                       const ibis::array_t<T>& rjcol,
00069                       const ibis::table::typeList& rtypes,
00070                       const std::vector<void*>& rbuff,
00071                       const ibis::array_t<T>& sjcol,
00072                       const ibis::table::typeList& stypes,
00073                       const std::vector<void*>& sbuff,
00074                       const ibis::table::stringList& cnamet,
00075                       const std::vector<uint32_t>& cnpos);
00076     static table*
00077     fillEquiJoinTable(size_t nrows,
00078                       const std::string &desc,
00079                       const std::vector<std::string>& rjcol,
00080                       const ibis::table::typeList& rtypes,
00081                       const std::vector<void*>& rbuff,
00082                       const std::vector<std::string>& sjcol,
00083                       const ibis::table::typeList& stypes,
00084                       const std::vector<void*>& sbuff,
00085                       const ibis::table::stringList& cnamet,
00086                       const std::vector<uint32_t>& cnpos);
00087 
00088 protected:
00089     join() {} //< Default constructor.  Can only be used by derived classes.
00090 
00091 private:
00092     join(const join&); // no copying
00093     join& operator=(const join&); // no assignment
00094 }; // class ibis::join
00095 #endif

Make It A Bit Faster
Contact us
Disclaimers
FastBit source code
FastBit mailing list archive