jrange.h
Go to the documentation of this file.
1 // File: $Id$
2 // Author: John Wu <John.Wu at ACM.org>
3 // Copyright (c) 2010-2016 the Regents of the University of California
4 #ifndef IBIS_JRANGE_H
5 #define IBIS_JRANGE_H
6 
13 #include "quaere.h" // ibis::quaere
14 
15 namespace ibis {
16  class jRange; // forward definition
17 } // namespace ibis
18 
37 class ibis::jRange : public ibis::quaere {
38 public:
39  jRange(const ibis::part& partr, const ibis::part& parts,
40  const ibis::column& colr, const ibis::column& cols,
41  double delta1, double delta2,
42  const ibis::qExpr* condr, const ibis::qExpr* conds,
43  const ibis::selectClause* sel, const ibis::fromClause* frm,
44  const char* desc);
45  virtual ~jRange();
46 
47  virtual void roughCount(uint64_t& nmin, uint64_t& nmax) const;
48  virtual int64_t count() const;
49 
50  virtual ibis::table* select() const;
51  virtual ibis::table* select(const char*) const;
52  virtual ibis::table* select(const ibis::table::stringArray& colnames) const;
53 
54 protected:
55  std::string desc_;
56  const ibis::selectClause *sel_;
57  const ibis::fromClause *frm_;
58  const ibis::part& partr_;
59  const ibis::part& parts_;
60  const ibis::column& colr_;
61  const ibis::column& cols_;
62  ibis::bitvector maskr_;
63  ibis::bitvector masks_;
64  const double delta1_;
65  const double delta2_;
66 
67  mutable array_t<uint32_t> *orderr_;
68  mutable array_t<uint32_t> *orders_;
69  mutable void *valr_;
70  mutable void *vals_;
71  mutable int64_t nrows;
72 
73  template <typename T>
74  static table*
75  fillResult(size_t nrows, double delta1, double delta2,
76  const std::string &desc,
77  const ibis::array_t<T>& rjcol,
78  const ibis::table::typeArray& rtypes,
79  const ibis::table::bufferArray& rbuff,
80  const ibis::array_t<T>& sjcol,
81  const ibis::table::typeArray& stypes,
82  const ibis::table::bufferArray& sbuff,
83  const ibis::table::stringArray& cnamet,
84  const std::vector<uint32_t>& cnpos);
85 
86 private:
87  jRange(const jRange&); // no copying
88  jRange& operator=(const jRange&); // no assignment
89 }; // class ibis::jRange
90 #endif
jRange(const ibis::part &partr, const ibis::part &parts, const ibis::column &colr, const ibis::column &cols, double delta1, double delta2, const ibis::qExpr *condr, const ibis::qExpr *conds, const ibis::selectClause *sel, const ibis::fromClause *frm, const char *desc)
Constructor.
Definition: jrange.cpp:18
virtual void roughCount(uint64_t &nmin, uint64_t &nmax) const
Estimate the number of hits. Nothing useful at this time.
Definition: jrange.cpp:108
In-memory Range Join.
Definition: jrange.h:37
virtual ibis::table * select() const
Produce a projection of the joint table.
Definition: jrange.cpp:362
The top level query expression object.
Definition: qExpr.h:36
A class to represent the select clause.
Definition: selectClause.h:112
The current implementation of FastBit is code named IBIS; most data structures and functions are in t...
Definition: bord.h:16
The class to represent a column of a data partition.
Definition: column.h:65
FastBit Quaere Interface.
virtual ~jRange()
Destructor.
Definition: jrange.cpp:96
virtual int64_t count() const
Compute the number of results.
Definition: jrange.cpp:114
The abstract table class.
Definition: table.h:77
The class ibis::part represents a partition of a relational table.
Definition: part.h:27
An abstract query interface.
Definition: quaere.h:35
A data structure to represent a sequence of bits.
Definition: bitvector.h:62
A class to represent the from clause.
Definition: fromClause.h:40

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