mensa.h
Go to the documentation of this file.
1 // File: $Id$
2 // Author: John Wu <John.Wu at acm.org>
3 // Lawrence Berkeley National Laboratory
4 // Copyright (c) 2007-2016 the Regents of the University of California
5 #ifndef IBIS_MENSA_H
6 #define IBIS_MENSA_H
7 #include "table.h" // ibis::table
8 #include "array_t.h" // ibis::array_t
9 
17 namespace ibis {
18  class mensa;
19  class liga;
20 } // namespace ibis
21 
29 class ibis::mensa : public ibis::table {
30 public:
31  mensa() : nrows(0) {};
32  explicit mensa(const char* dir);
33  mensa(const char* dir1, const char* dir2);
34  virtual ~mensa() {clear();}
35 
36  virtual uint64_t nRows() const {return nrows;}
37  virtual uint32_t nColumns() const;
38 
39  virtual typeArray columnTypes() const;
40  virtual stringArray columnNames() const;
41  virtual int addPartition(const char*);
42  virtual int dropPartition(const char*);
43 
44  virtual void describe(std::ostream&) const;
45  virtual void dumpNames(std::ostream&, const char*) const;
46  virtual int dump(std::ostream&, const char*) const;
47  virtual int dump(std::ostream&, uint64_t, const char*) const;
48  virtual int dump(std::ostream&, uint64_t, uint64_t, const char*) const;
49  virtual int backup(const char* dir, const char* tname=0,
50  const char* tdesc=0) const;
51 
52  virtual int64_t
53  getColumnAsBytes(const char*, char*, uint64_t =0, uint64_t =0) const;
54  virtual int64_t
55  getColumnAsUBytes(const char*, unsigned char*,
56  uint64_t =0, uint64_t =0) const;
57  virtual int64_t
58  getColumnAsShorts(const char*, int16_t*, uint64_t =0, uint64_t =0) const;
59  virtual int64_t
60  getColumnAsUShorts(const char*, uint16_t*, uint64_t =0, uint64_t =0) const;
61  virtual int64_t
62  getColumnAsInts(const char*, int32_t*, uint64_t =0, uint64_t =0) const;
63  virtual int64_t
64  getColumnAsUInts(const char*, uint32_t*, uint64_t =0, uint64_t =0) const;
65  virtual int64_t
66  getColumnAsLongs(const char*, int64_t*, uint64_t =0, uint64_t =0) const;
67  virtual int64_t
68  getColumnAsULongs(const char*, uint64_t*, uint64_t =0, uint64_t =0) const;
69  virtual int64_t
70  getColumnAsFloats(const char*, float*, uint64_t =0, uint64_t =0) const;
71  virtual int64_t
72  getColumnAsDoubles(const char*, double*, uint64_t =0, uint64_t =0) const;
73  virtual int64_t
74  getColumnAsDoubles(const char*, std::vector<double>&,
75  uint64_t =0, uint64_t =0) const;
76  virtual int64_t
77  getColumnAsStrings(const char*, std::vector<std::string>&,
78  uint64_t =0, uint64_t =0) const;
79  virtual int64_t
80  getColumnAsOpaques(const char*, std::vector<ibis::opaque>&,
81  uint64_t =0, uint64_t =0) const;
82  virtual double getColumnMin(const char*) const;
83  virtual double getColumnMax(const char*) const;
84 
85  virtual long getHistogram(const char*, const char*,
86  double, double, double,
87  std::vector<uint32_t>&) const;
88  virtual long getHistogram2D(const char*, const char*,
89  double, double, double,
90  const char*,
91  double, double, double,
92  std::vector<uint32_t>&) const;
93  virtual long getHistogram3D(const char*, const char*,
94  double, double, double,
95  const char*,
96  double, double, double,
97  const char*,
98  double, double, double,
99  std::vector<uint32_t>&) const;
100 
101  virtual void estimate(const char* cond,
102  uint64_t& nmin, uint64_t& nmax) const;
103  virtual void estimate(const ibis::qExpr* cond,
104  uint64_t& nmin, uint64_t& nmax) const;
105  using table::select;
106  virtual table* select(const char* sel, const char* cond) const;
107  virtual table* select2(const char* sel, const char* cond,
108  const char* pts) const;
109 
110  virtual void orderby(const stringArray&, const std::vector<bool>&);
111  virtual void orderby(const stringArray&);
112  virtual void orderby(const char *str) {ibis::table::orderby(str);}
115  virtual void reverseRows() {};
118  virtual table* groupby(const stringArray&) const {return 0;}
121  virtual table* groupby(const char *) const {return 0;}
122 
123  virtual int buildIndex(const char*, const char*);
124  virtual int buildIndexes(const char*);
125  virtual int buildIndexes(const ibis::table::stringArray&);
126  virtual const char* indexSpec(const char*) const;
127  virtual void indexSpec(const char*, const char*);
128  virtual int getPartitions(ibis::constPartList &) const;
129  virtual int mergeCategories(const ibis::table::stringArray&);
130 
131  // Cursor class for row-wise data accesses.
132  class cursor;
134  virtual ibis::table::cursor* createCursor() const;
135 
136 protected:
138  ibis::partList parts;
141  uint64_t nrows;
142 
144  void clear();
146  int64_t computeHits(const char* cond) const {
148  (reinterpret_cast<const ibis::constPartList&>(parts),
149  cond);}
150 
151 private:
152  // disallow copying.
153  mensa(const mensa&);
154  mensa& operator=(const mensa&);
155 
156  friend class cursor;
157 }; // ibis::mensa
158 
160 public:
161  cursor(const ibis::mensa& t);
162  virtual ~cursor() {clearBuffers();};
163 
164  virtual uint64_t nRows() const {return tab.nRows();}
165  virtual uint32_t nColumns() const {return tab.nColumns();}
166  virtual ibis::table::stringArray columnNames() const {
167  return tab.columnNames();}
168  virtual ibis::table::typeArray columnTypes() const {
169  return tab.columnTypes();}
170  virtual int fetch();
171  virtual int fetch(uint64_t);
172  virtual int fetch(ibis::table::row&);
173  virtual int fetch(uint64_t, ibis::table::row&);
174  virtual uint64_t getCurrentRowNumber() const {return curRow;}
175  virtual int dump(std::ostream& out, const char* del) const;
176 
177  int dumpBlock(std::ostream& out, const char* del);
178  int dumpSome(std::ostream& out, uint64_t nr, const char* del);
179 
180  virtual int getColumnAsByte(const char*, char&) const;
181  virtual int getColumnAsUByte(const char*, unsigned char&) const;
182  virtual int getColumnAsShort(const char*, int16_t&) const;
183  virtual int getColumnAsUShort(const char*, uint16_t&) const;
184  virtual int getColumnAsInt(const char*, int32_t&) const;
185  virtual int getColumnAsUInt(const char*, uint32_t&) const;
186  virtual int getColumnAsLong(const char*, int64_t&) const;
187  virtual int getColumnAsULong(const char*, uint64_t&) const;
188  virtual int getColumnAsFloat(const char*, float&) const;
189  virtual int getColumnAsDouble(const char*, double&) const;
190  virtual int getColumnAsString(const char*, std::string&) const;
191  virtual int getColumnAsOpaque(const char*, ibis::opaque&) const;
192 
193  virtual int getColumnAsByte(uint32_t, char&) const;
194  virtual int getColumnAsUByte(uint32_t, unsigned char&) const;
195  virtual int getColumnAsShort(uint32_t, int16_t&) const;
196  virtual int getColumnAsUShort(uint32_t, uint16_t&) const;
197  virtual int getColumnAsInt(uint32_t, int32_t&) const;
198  virtual int getColumnAsUInt(uint32_t, uint32_t&) const;
199  virtual int getColumnAsLong(uint32_t, int64_t&) const;
200  virtual int getColumnAsULong(uint32_t, uint64_t&) const;
201  virtual int getColumnAsFloat(uint32_t, float&) const;
202  virtual int getColumnAsDouble(uint32_t, double&) const;
203  virtual int getColumnAsString(uint32_t, std::string&) const;
204  virtual int getColumnAsOpaque(uint32_t, ibis::opaque&) const;
205 
206 protected:
212  struct bufferElement {
213  const char* cname;
215  mutable void* cval;
216 
217  bufferElement() : cname(0), ctype(ibis::UNKNOWN_TYPE), cval(0) {}
218  ~bufferElement();
219  }; // bufferElement
220  typedef std::map<const char*, uint32_t, ibis::lessi> bufferMap;
221  std::vector<bufferElement> buffer;
222  bufferMap bufmap;
223  const ibis::mensa& tab;
224  unsigned curPart;
225  unsigned preferred_block_size;
226  uint64_t pBegin;
227  uint64_t bBegin;
228  uint64_t bEnd;
229  int64_t curRow;
230 
231  void clearBuffers();
232  int fillBuffers() const;
233  int fillBuffer(uint32_t) const;
234  void fillRow(ibis::table::row& res) const;
235  int dumpIJ(std::ostream&, uint32_t, uint32_t) const;
236 
237 private:
238  cursor();
239  cursor(const cursor&);
240  cursor& operator=(const cursor&);
241 }; // ibis::mensa::cursor
242 
251 class ibis::liga : public ibis::mensa {
252 public:
253  liga(ibis::part&);
254  liga(const ibis::partList&);
255  ~liga();
256 
259  virtual int addPartition(const char*) {return -1;}
260 
261 private:
262  liga();
263  liga(const liga&);
264  liga& operator=(const liga&);
265 }; // ibis::liga
266 
267 inline int
268 ibis::mensa::cursor::getColumnAsByte(const char* cn, char& val) const {
269  if (curRow < 0 || curPart >= tab.parts.size() || cn == 0 || *cn == 0)
270  return -1;
271  bufferMap::const_iterator it = bufmap.find(cn);
272  if (it != bufmap.end())
273  return getColumnAsByte((*it).second, val);
274  else
275  return -2;
276 } // ibis::mensa::cursor::getColumnAsByte
277 
278 inline int
280  unsigned char& val) const {
281  if (curRow < 0 || curPart >= tab.parts.size() || cn == 0 || *cn == 0)
282  return -1;
283  bufferMap::const_iterator it = bufmap.find(cn);
284  if (it != bufmap.end())
285  return getColumnAsUByte((*it).second, val);
286  else
287  return -2;
288 } // ibis::mensa::cursor::getColumnAsUByte
289 
290 inline int
291 ibis::mensa::cursor::getColumnAsShort(const char* cn, int16_t& val) const {
292  if (curRow < 0 || curPart >= tab.parts.size() || cn == 0 || *cn == 0)
293  return -1;
294  bufferMap::const_iterator it = bufmap.find(cn);
295  if (it != bufmap.end())
296  return getColumnAsShort((*it).second, val);
297  else
298  return -2;
299 } // ibis::mensa::cursor::getColumnAsShort
300 
301 inline int
302 ibis::mensa::cursor::getColumnAsUShort(const char* cn, uint16_t& val) const {
303  if (curRow < 0 || curPart >= tab.parts.size() || cn == 0 || *cn == 0)
304  return -1;
305  bufferMap::const_iterator it = bufmap.find(cn);
306  if (it != bufmap.end())
307  return getColumnAsUShort((*it).second, val);
308  else
309  return -2;
310 } // ibis::mensa::cursor::getColumnAsUShort
311 
312 inline int
313 ibis::mensa::cursor::getColumnAsInt(const char* cn, int32_t& val) const {
314  if (curRow < 0 || curPart >= tab.parts.size() || cn == 0 || *cn == 0)
315  return -1;
316  bufferMap::const_iterator it = bufmap.find(cn);
317  if (it != bufmap.end())
318  return getColumnAsInt((*it).second, val);
319  else
320  return -2;
321 } // ibis::mensa::cursor::getColumnAsInt
322 
323 inline int
324 ibis::mensa::cursor::getColumnAsUInt(const char* cn, uint32_t& val) const {
325  if (curRow < 0 || curPart >= tab.parts.size() || cn == 0 || *cn == 0)
326  return -1;
327  bufferMap::const_iterator it = bufmap.find(cn);
328  if (it != bufmap.end())
329  return getColumnAsUInt((*it).second, val);
330  else
331  return -2;
332 } // ibis::mensa::cursor::getColumnAsUInt
333 
334 inline int
335 ibis::mensa::cursor::getColumnAsLong(const char* cn, int64_t& val) const {
336  if (curRow < 0 || curPart >= tab.parts.size() || cn == 0 || *cn == 0)
337  return -1;
338  bufferMap::const_iterator it = bufmap.find(cn);
339  if (it != bufmap.end())
340  return getColumnAsLong((*it).second, val);
341  else
342  return -2;
343 } // ibis::mensa::cursor::getColumnAsLong
344 
345 inline int
346 ibis::mensa::cursor::getColumnAsULong(const char* cn, uint64_t& val) const {
347  if (curRow < 0 || curPart >= tab.parts.size() || cn == 0 || *cn == 0)
348  return -1;
349  bufferMap::const_iterator it = bufmap.find(cn);
350  if (it != bufmap.end())
351  return getColumnAsULong((*it).second, val);
352  else
353  return -2;
354 } // ibis::mensa::cursor::getColumnAsULong
355 
356 inline int
357 ibis::mensa::cursor::getColumnAsFloat(const char* cn, float& val) const {
358  if (curRow < 0 || curPart >= tab.parts.size() || cn == 0 || *cn == 0)
359  return -1;
360  bufferMap::const_iterator it = bufmap.find(cn);
361  if (it != bufmap.end())
362  return getColumnAsFloat((*it).second, val);
363  else
364  return -2;
365 } // ibis::mensa::cursor::getColumnAsFloat
366 
367 inline int
368 ibis::mensa::cursor::getColumnAsDouble(const char* cn, double& val) const {
369  if (curRow < 0 || curPart >= tab.parts.size() || cn == 0 || *cn == 0)
370  return -1;
371  bufferMap::const_iterator it = bufmap.find(cn);
372  if (it != bufmap.end())
373  return getColumnAsDouble((*it).second, val);
374  else
375  return -2;
376 } // ibis::mensa::cursor::getColumnAsDouble
377 
378 inline int
380  std::string& val) const {
381  if (curRow < 0 || curPart >= tab.parts.size() || cn == 0 || *cn == 0)
382  return -1;
383  bufferMap::const_iterator it = bufmap.find(cn);
384  if (it != bufmap.end())
385  return getColumnAsString((*it).second, val);
386  else
387  return -2;
388 } // ibis::mensa::cursor::getColumnAsString
389 
390 inline int
392  ibis::opaque& val) const {
393  if (curRow < 0 || curPart >= tab.parts.size() || cn == 0 || *cn == 0)
394  return -1;
395  bufferMap::const_iterator it = bufmap.find(cn);
396  if (it != bufmap.end())
397  return getColumnAsOpaque((*it).second, val);
398  else
399  return -2;
400 } // ibis::mensa::cursor::getColumnAsOpaque
401 
402 inline int
403 ibis::mensa::dump(std::ostream& out, uint64_t nr, const char* del) const {
404  if (parts.empty() || nr == 0) return 0;
405  ibis::mensa::cursor cur(*this);
406  int ierr = cur.dumpSome(out, nr, del);
407  return ierr;
408 } // ibis::mensa::dump
409 
410 inline int
411 ibis::mensa::dump(std::ostream& out, uint64_t off, uint64_t nr,
412  const char* del) const {
413  if (parts.empty() || nr == 0 || off > nrows) return 0;
414  ibis::mensa::cursor cur(*this);
415  int ierr = cur.fetch(off);
416  if (ierr < 0) return ierr;
417 
418  ierr = cur.dumpSome(out, nr, del);
419  return ierr;
420 } // ibis::mensa::dump
421 #endif // IBIS_MENSA_H
void * cval
!< Column type.
Definition: mensa.h:215
virtual int64_t getColumnAsLongs(const char *, int64_t *, uint64_t=0, uint64_t=0) const
Definition: mensa.cpp:1151
virtual int getColumnAsByte(const char *, char &) const
Definition: mensa.h:268
virtual void describe(std::ostream &) const
!< Return data types.
Definition: mensa.cpp:287
virtual int64_t getColumnAsInts(const char *, int32_t *, uint64_t=0, uint64_t=0) const
Retrieve all values of the named column.
Definition: mensa.cpp:942
virtual int64_t getColumnAsUInts(const char *, uint32_t *, uint64_t=0, uint64_t=0) const
Retrieve all values of the named column.
Definition: mensa.cpp:1065
uint64_t bBegin
!< the first row number of the current partition
Definition: mensa.h:227
int64_t curRow
!< end of the current block
Definition: mensa.h:229
virtual int getColumnAsLong(const char *, int64_t &) const
Definition: mensa.h:335
virtual int getColumnAsUShort(const char *, uint16_t &) const
Definition: mensa.h:302
virtual const char * indexSpec(const char *) const
Retrieve the current indexing option.
Definition: mensa.cpp:308
virtual table * groupby(const char *) const
Directly performing group-by on the base data (without selection) is not currently supported...
Definition: mensa.h:121
virtual int fetch()
Points the the next row.
Definition: mensa.cpp:3103
virtual long getHistogram(const char *, const char *, double, double, double, std::vector< uint32_t > &) const
Definition: mensa.cpp:2657
virtual int getColumnAsULong(const char *, uint64_t &) const
Definition: mensa.h:346
Definition: mensa.h:159
virtual int mergeCategories(const ibis::table::stringArray &)
Merge the dictionaries of categorical value from different data partitions.
Definition: mensa.cpp:383
std::map< const char *, ibis::TYPE_T, ibis::lessi > namesTypes
An associative array of names and types.
Definition: table.h:123
The top level query expression object.
Definition: qExpr.h:36
virtual int64_t getColumnAsDoubles(const char *, double *, uint64_t=0, uint64_t=0) const
Definition: mensa.cpp:1551
A simple struct for storing a row of a table.
Definition: table.h:395
ibis::partList parts
List of data partitions.
Definition: mensa.h:138
virtual table * groupby(const stringArray &) const
Directly performing group-by on the base data (without selection) is not currently supported...
Definition: mensa.h:118
void clear()
Clear the existing content.
Definition: mensa.cpp:235
virtual int getColumnAsDouble(const char *, double &) const
Definition: mensa.h:368
virtual int buildIndex(const char *, const char *)
The following functions deal with auxillary data for accelerating query processing, primarily for building indexes.
Definition: mensa.cpp:345
virtual int dump(std::ostream &, const char *) const
Print the values in ASCII form to the specified output stream.
Definition: mensa.cpp:2797
virtual double getColumnMax(const char *) const
Compute the maximum of all valid values in the name column.
Definition: mensa.cpp:2638
The current implementation of FastBit is code named IBIS; most data structures and functions are in t...
Definition: bord.h:16
Cursor class for row-wise data accesses.
Definition: table.h:835
int64_t computeHits(const char *cond) const
Compute the number of hits.
Definition: mensa.h:146
virtual ibis::table::cursor * createCursor() const
Create a cursor object to perform row-wise data access.
Definition: mensa.cpp:2816
virtual uint64_t getCurrentRowNumber() const
Return the current row number.
Definition: mensa.h:174
int dumpSome(std::ostream &out, uint64_t nr, const char *del)
Print the next nr rows of the table to the specified output stream.
Definition: mensa.cpp:3436
virtual void orderby(const stringArray &)=0
Reorder the rows.
void clearBuffers()
!< the current row number
Definition: mensa.cpp:3059
virtual int64_t getColumnAsULongs(const char *, uint64_t *, uint64_t=0, uint64_t=0) const
Definition: mensa.cpp:1319
virtual int64_t getColumnAsStrings(const char *, std::vector< std::string > &, uint64_t=0, uint64_t=0) const
Convert values to their string form.
Definition: mensa.cpp:1967
virtual long getHistogram2D(const char *, const char *, double, double, double, const char *, double, double, double, std::vector< uint32_t > &) const
Compute a two-dimension histogram on columns cname1 and cname2.
Definition: mensa.cpp:2695
A buffer element is a minimal data structure to store a column in memory.
Definition: mensa.h:212
virtual int addPartition(const char *)
Add data partitions defined in the named directory.
Definition: mensa.cpp:123
uint64_t bEnd
!< the first row number of the current block
Definition: mensa.h:228
ibis::table::namesTypes naty
A combined list of columns names.
Definition: mensa.h:140
virtual int64_t getColumnAsOpaques(const char *, std::vector< ibis::opaque > &, uint64_t=0, uint64_t=0) const
Retrieve the blobs as ibis::opaque objects.
Definition: mensa.cpp:2291
int dumpIJ(std::ostream &, uint32_t, uint32_t) const
Print the ith element in the current block for column j.
Definition: mensa.cpp:3503
virtual int addPartition(const char *)
The list of partitions in this class can NOT be expanded or otherwise modified.
Definition: mensa.h:259
static int64_t computeHits(const ibis::constPartList &parts, const char *cond)
Compute the number of rows satisfying the specified conditions.
Definition: mensa.cpp:4752
virtual uint32_t nColumns() const
Number of columns.
Definition: mensa.cpp:254
virtual int64_t getColumnAsFloats(const char *, float *, uint64_t=0, uint64_t=0) const
Definition: mensa.cpp:1427
virtual double getColumnMin(const char *) const
Compute the minimum of all valid values in the name column.
Definition: mensa.cpp:2619
virtual int64_t getColumnAsUBytes(const char *, unsigned char *, uint64_t=0, uint64_t=0) const
Retrieve all values of the named column.
Definition: mensa.cpp:783
virtual int getColumnAsUInt(const char *, uint32_t &) const
Definition: mensa.h:324
int fillBuffers() const
Fill the buffers for every column.
Definition: mensa.cpp:2983
virtual table * select2(const char *sel, const char *cond, const char *pts) const
A variation of the function select defined in ibis::table.
Definition: mensa.cpp:638
The abstract table class.
Definition: table.h:77
ibis::array_t< ibis::TYPE_T > typeArray
A list of data types.
Definition: table.h:117
virtual long getHistogram3D(const char *, const char *, double, double, double, const char *, double, double, double, const char *, double, double, double, std::vector< uint32_t > &) const
Compute a three-dimensional histogram on the named columns.
Definition: mensa.cpp:2742
virtual int getColumnAsOpaque(const char *, ibis::opaque &) const
Definition: mensa.h:391
The class ibis::part represents a partition of a relational table.
Definition: part.h:27
TYPE_T
Supported data types.
Definition: table.h:25
virtual int getColumnAsShort(const char *, int16_t &) const
Definition: mensa.h:291
virtual int getPartitions(ibis::constPartList &) const
Retrieve the list of partitions.
Definition: mensa.cpp:222
virtual void orderby(const char *str)
Reorder the rows. The column names are separated by commas.
Definition: mensa.h:112
virtual int dropPartition(const char *)
Remove the named data partition from this data table.
Definition: mensa.cpp:170
virtual int getColumnAsFloat(const char *, float &) const
Definition: mensa.h:357
ibis::array_t< const char * > stringArray
A list of strings.
Definition: table.h:114
~bufferElement()
Destructor for bufferElement.
Definition: mensa.cpp:4239
virtual int buildIndexes(const char *)
Create indexes for every column of the table.
Definition: mensa.cpp:367
Class ibis::mensa contains multiple (horizontal) data partitions (ibis::part) to form a logical data ...
Definition: mensa.h:29
virtual int64_t getColumnAsBytes(const char *, char *, uint64_t=0, uint64_t=0) const
Retrieve all values of the named column.
Definition: mensa.cpp:746
virtual int64_t getColumnAsShorts(const char *, int16_t *, uint64_t=0, uint64_t=0) const
Retrieve all values of the named column.
Definition: mensa.cpp:820
int dumpBlock(std::ostream &out, const char *del)
Print out the content of the current block.
Definition: mensa.cpp:3385
virtual int backup(const char *dir, const char *tname=0, const char *tdesc=0) const
Write the current content to the specified output directory in the raw binary format.
Definition: mensa.cpp:2809
~liga()
Ibis::liga does not own the data partitions and does not free the resources in those partitions...
Definition: mensa.cpp:4282
virtual void dumpNames(std::ostream &, const char *) const
Print all column names on one line.
Definition: mensa.cpp:298
A specialization of class mensa.
Definition: mensa.h:251
Unknown type, a place holder. Can not process data of this type!
Definition: table.h:27
virtual uint64_t nRows() const
The number of rows in this table.
Definition: mensa.h:36
virtual table * select(const char *sel, const char *cond) const =0
Given a set of column names and a set of selection conditions, compute another table that represents ...
virtual int64_t getColumnAsUShorts(const char *, uint16_t *, uint64_t=0, uint64_t=0) const
Retrieve all values of the named column.
Definition: mensa.cpp:881
FastBit Table Interface.
virtual void estimate(const char *cond, uint64_t &nmin, uint64_t &nmax) const
Estimate the number of rows satisfying the selection conditions.
Definition: mensa.cpp:528
virtual int getColumnAsUByte(const char *, unsigned char &) const
Definition: mensa.h:279
virtual void orderby(const stringArray &, const std::vector< bool > &)
Reordering the rows using the specified columns.
Definition: mensa.cpp:733
ibis::TYPE_T ctype
!< Column name.
Definition: mensa.h:214
int fillBuffer(uint32_t) const
Fill the buffer for variable number i.
Definition: mensa.cpp:2885
virtual int dump(std::ostream &out, const char *del) const
Print the current row.
Definition: mensa.cpp:3348
virtual typeArray columnTypes() const
Return the column types in a list.
Definition: mensa.cpp:277
virtual int getColumnAsInt(const char *, int32_t &) const
Definition: mensa.h:313
virtual table * select(const char *sel, const char *cond) const
Given a set of column names and a set of selection conditions, compute another table that represents ...
Definition: mensa.cpp:586
virtual void reverseRows()
Reversing the ordering of the rows on disk requires too much work but has no obvious benefit...
Definition: mensa.h:115
virtual int getColumnAsString(const char *, std::string &) const
Definition: mensa.h:379
bufferElement()
!< Pointer to raw data.
Definition: mensa.h:217
virtual stringArray columnNames() const
Return the column names in a list.
Definition: mensa.cpp:266

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