Public Member Functions | List of all members
ibis::liga Class Reference

A specialization of class mensa. More...

#include <mensa.h>

Inheritance diagram for ibis::liga:
ibis::mensa ibis::table

Public Member Functions

virtual int addPartition (const char *)
 The list of partitions in this class can NOT be expanded or otherwise modified. More...
 
 liga (ibis::part &)
 Create an object from an externally managed data partition.
 
 liga (const ibis::partList &)
 Create an object from an external list of data partitions. More...
 
 ~liga ()
 Ibis::liga does not own the data partitions and does not free the resources in those partitions. More...
 
- Public Member Functions inherited from ibis::mensa
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. More...
 
virtual int buildIndex (const char *, const char *)
 The following functions deal with auxillary data for accelerating query processing, primarily for building indexes. More...
 
virtual int buildIndexes (const char *)
 Create indexes for every column of the table. More...
 
virtual int buildIndexes (const ibis::table::stringArray &)
 The following functions deal with auxillary data for accelerating query processing, primarily for building indexes. More...
 
virtual stringArray columnNames () const
 Return the column names in a list. More...
 
virtual typeArray columnTypes () const
 Return the column types in a list.
 
virtual ibis::table::cursorcreateCursor () const
 Create a cursor object to perform row-wise data access.
 
virtual void describe (std::ostream &) const
 !< Return data types. More...
 
virtual int dropPartition (const char *)
 Remove the named data partition from this data table. More...
 
virtual int dump (std::ostream &, const char *) const
 Print the values in ASCII form to the specified output stream. More...
 
virtual int dump (std::ostream &, uint64_t, const char *) const
 Print the first nr rows.
 
virtual int dump (std::ostream &, uint64_t, uint64_t, const char *) const
 Print nr rows starting with row offset. More...
 
virtual void dumpNames (std::ostream &, const char *) const
 Print all column names on one line.
 
virtual void estimate (const char *cond, uint64_t &nmin, uint64_t &nmax) const
 Estimate the number of rows satisfying the selection conditions. More...
 
virtual void estimate (const ibis::qExpr *cond, uint64_t &nmin, uint64_t &nmax) const
 Estimate the number of rows satisfying the selection conditions. More...
 
virtual int64_t getColumnAsBytes (const char *, char *, uint64_t=0, uint64_t=0) const
 Retrieve all values of the named column. More...
 
virtual int64_t getColumnAsDoubles (const char *, double *, uint64_t=0, uint64_t=0) const
 
virtual int64_t getColumnAsDoubles (const char *, std::vector< double > &, uint64_t=0, uint64_t=0) const
 Retrieve all values of the named column. More...
 
virtual int64_t getColumnAsFloats (const char *, float *, uint64_t=0, uint64_t=0) const
 
virtual int64_t getColumnAsInts (const char *, int32_t *, uint64_t=0, uint64_t=0) const
 Retrieve all values of the named column. More...
 
virtual int64_t getColumnAsLongs (const char *, int64_t *, uint64_t=0, uint64_t=0) const
 
virtual int64_t getColumnAsOpaques (const char *, std::vector< ibis::opaque > &, uint64_t=0, uint64_t=0) const
 Retrieve the blobs as ibis::opaque objects. More...
 
virtual int64_t getColumnAsShorts (const char *, int16_t *, uint64_t=0, uint64_t=0) const
 Retrieve all values of the named column. More...
 
virtual int64_t getColumnAsStrings (const char *, std::vector< std::string > &, uint64_t=0, uint64_t=0) const
 Convert values to their string form. More...
 
virtual int64_t getColumnAsUBytes (const char *, unsigned char *, uint64_t=0, uint64_t=0) const
 Retrieve all values of the named column. More...
 
virtual int64_t getColumnAsUInts (const char *, uint32_t *, uint64_t=0, uint64_t=0) const
 Retrieve all values of the named column. More...
 
virtual int64_t getColumnAsULongs (const char *, uint64_t *, uint64_t=0, uint64_t=0) const
 
virtual int64_t getColumnAsUShorts (const char *, uint16_t *, uint64_t=0, uint64_t=0) const
 Retrieve all values of the named column. More...
 
virtual double getColumnMax (const char *) const
 Compute the maximum of all valid values in the name column. More...
 
virtual double getColumnMin (const char *) const
 Compute the minimum of all valid values in the name column. More...
 
virtual long getHistogram (const char *, const char *, double, double, double, std::vector< uint32_t > &) const
 
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. More...
 
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. More...
 
virtual int getPartitions (ibis::constPartList &) const
 Retrieve the list of partitions.
 
virtual tablegroupby (const stringArray &) const
 Directly performing group-by on the base data (without selection) is not currently supported. More...
 
virtual tablegroupby (const char *) const
 Directly performing group-by on the base data (without selection) is not currently supported. More...
 
virtual const char * indexSpec (const char *) const
 Retrieve the current indexing option. More...
 
virtual void indexSpec (const char *, const char *)
 Replace the current indexing option. More...
 
 mensa (const char *dir)
 This function expects a valid data directory to find data partitions. More...
 
 mensa (const char *dir1, const char *dir2)
 This function expects a pair of data directories to define data partitions. More...
 
virtual int mergeCategories (const ibis::table::stringArray &)
 Merge the dictionaries of categorical value from different data partitions. More...
 
virtual uint32_t nColumns () const
 Number of columns. More...
 
virtual uint64_t nRows () const
 The number of rows in this table.
 
virtual void orderby (const stringArray &, const std::vector< bool > &)
 Reordering the rows using the specified columns. More...
 
virtual void orderby (const stringArray &)
 Reordering the rows using the specified columns. More...
 
virtual void orderby (const char *str)
 Reorder the rows. The column names are separated by commas.
 
virtual void reverseRows ()
 Reversing the ordering of the rows on disk requires too much work but has no obvious benefit. More...
 
virtual tableselect (const char *sel, const char *cond) const
 Given a set of column names and a set of selection conditions, compute another table that represents the selected values. More...
 
virtual tableselect2 (const char *sel, const char *cond, const char *pts) const
 A variation of the function select defined in ibis::table. More...
 
- Public Member Functions inherited from ibis::table
virtual const char * description () const
 Free text description. May return a null pointer.
 
virtual const char * name () const
 Name of the table. More...
 
virtual tableselect (const char *sel, const ibis::qExpr *cond) const
 Process the selection conditions and generate another table to hold the answer. More...
 
virtual ~table ()
 Destructor.
 

Additional Inherited Members

- Public Types inherited from ibis::table
typedef ibis::array_t< void * > bufferArray
 A list to hold the in-memory buffers. More...
 
typedef std::map< const char *, ibis::TYPE_T, ibis::lessi > namesTypes
 An associative array of names and types.
 
typedef ibis::array_t< const char * > stringArray
 A list of strings. More...
 
typedef std::vector< const char * > stringVector
 
typedef ibis::array_t< ibis::TYPE_TtypeArray
 A list of data types.
 
- Static Public Member Functions inherited from ibis::table
static void * allocateBuffer (ibis::TYPE_T, size_t)
 Allocate a buffer of the specified type and size.
 
static int64_t computeHits (const ibis::constPartList &parts, const char *cond)
 Compute the number of rows satisfying the specified conditions. More...
 
static int64_t computeHits (const ibis::constPartList &parts, const ibis::qExpr *cond)
 Compute the number of rows satisfying the specified query expression. More...
 
static void consecrateName (char *)
 Remove unallowed characters from the given string to produce a valid column name. More...
 
static ibis::tablecreate (ibis::part &)
 Create a simple of container of a partition. More...
 
static ibis::tablecreate (const ibis::partList &)
 Create a container of externally managed data partitions. More...
 
static ibis::tablecreate (const char *dir)
 Create a table object from the specified data directory. More...
 
static ibis::tablecreate (const char *dir1, const char *dir2)
 Create a table object from a pair of data directories. More...
 
static void freeBuffer (void *buffer, ibis::TYPE_T type)
 Freeing a buffer for storing in-memory values. More...
 
static void freeBuffers (bufferArray &, typeArray &)
 Freeing a list of buffers. More...
 
static bool isValidName (const char *)
 Is the given string a valid FastBit name for a data column?
 
static void parseNames (char *in, stringVector &out)
 Parse the incoming string into a set of names. More...
 
static void parseNames (char *in, stringArray &out)
 Parse the incoming string into a set of names. More...
 
static void parseOrderby (char *in, stringArray &out, std::vector< bool > &direc)
 Parse the incoming string as an order-by clause. More...
 
static tableselect (const ibis::constPartList &parts, const char *sel, const char *cond)
 Perform the select operation on a list of data partitions. More...
 
static tableselect (const ibis::constPartList &parts, const char *sel, const ibis::qExpr *cond)
 Perform select operation using a user-supplied query expression. More...
 
- Protected Member Functions inherited from ibis::mensa
void clear ()
 Clear the existing content.
 
int64_t computeHits (const char *cond) const
 Compute the number of hits.
 
- Protected Member Functions inherited from ibis::table
 table ()
 !< Description of the table. More...
 
 table (const char *na, const char *de)
 Constructor. Use the user-supplied name and description.
 
- Protected Attributes inherited from ibis::mensa
ibis::table::namesTypes naty
 A combined list of columns names.
 
uint64_t nrows
 
ibis::partList parts
 List of data partitions.
 
- Protected Attributes inherited from ibis::table
std::string desc_
 !< Name of the table.
 
std::string name_
 

Detailed Description

A specialization of class mensa.

It holds a list of data partitions but does not own them. It does not create these partitions nor delete them. It inherits the public functions of mensa without making any additions or modifications.

Note
About the name: Liga is the Danish translation of the term "league table." Oh, well, guess we are running out short names for a table.

Constructor & Destructor Documentation

ibis::liga::liga ( const ibis::partList &  l)

Create an object from an external list of data partitions.

Note that this object does not own the partitions and is not reponsible for freeing the partitions. It merely provide a container for the partitions so that one can use the ibis::table API.

References ibis::table::desc_, liga(), ibis::mensa::naty, and ibis::mensa::parts.

ibis::liga::~liga ( )

Ibis::liga does not own the data partitions and does not free the resources in those partitions.

References ibis::mensa::parts.

Member Function Documentation

virtual int ibis::liga::addPartition ( const char *  )
inlinevirtual

The list of partitions in this class can NOT be expanded or otherwise modified.

Reimplemented from ibis::mensa.


The documentation for this class was generated from the following files:

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