Go to the documentation of this file.00001
00002
00003
00004 #ifndef IBIS_JOIN_H
00005 #define IBIS_JOIN_H
00006
00013 #include "table.h"
00014 #include "part.h"
00015
00016 namespace ibis {
00017 class join;
00018 }
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() {}
00090
00091 private:
00092 join(const join&);
00093 join& operator=(const join&);
00094 };
00095 #endif