Changeset: 7f4cac872be5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7f4cac872be5
Modified Files:
gdk/gdk.h
gdk/gdk_align.c
gdk/gdk_atoms.c
gdk/gdk_atoms.h
gdk/gdk_bat.c
gdk/gdk_bat.h
gdk/gdk_bat.mx
gdk/gdk_batop.mx
gdk/gdk_bbp.c
gdk/gdk_bbp.h
gdk/gdk_delta.c
gdk/gdk_delta.h
gdk/gdk_heap.c
gdk/gdk_logger.mx
gdk/gdk_posix.c
gdk/gdk_qsort.c
gdk/gdk_qsort_impl.h
gdk/gdk_rangejoin.mx
gdk/gdk_relop.mx
gdk/gdk_scanselect.mx
gdk/gdk_scanselect_defs.mx
gdk/gdk_search.c
gdk/gdk_search.h
gdk/gdk_search.mx
gdk/gdk_setop.mx
gdk/gdk_ssort_impl.h
gdk/gdk_storage.c
gdk/gdk_tm.c
gdk/gdk_utils.c
gdk/gdk_value.c
Branch: headless
Log Message:
Converted gdk_bat and globally (within gdk) substituted BAT by COL.
The converted files can be compiled.
diffs (truncated from 18852 to 300 lines):
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -60,36 +60,36 @@
* @item
* GDK or Goblin Database Kernel routines for session management
* @item
- * BAT routines that define the primitive operations on the
- * database tables (BATs).
+ * COL routines that define the primitive operations on the
+ * database tables (COLs).
* @item
- * BBP routines to manage the BAT Buffer Pool (BBP).
+ * BBP routines to manage the COL Buffer Pool (BBP).
* @item
* ATOM routines to manipulate primitive types, define new types
* using an ADT interface.
* @item
* HEAP routines for manipulating heaps: linear spaces of memory
- * that are GDK's vehicle of mass storage (on which BATs are built).
+ * that are GDK's vehicle of mass storage (on which COLs are built).
* @item
* DELTA routines to access inserted/deleted elements within a
* transaction.
* @item
* HASH routines for manipulating GDK's built-in linear-chained
- * hash tables, for accelerating lookup searches on BATs.
+ * hash tables, for accelerating lookup searches on COLs.
* @item
* TM routines that provide basic transaction management primitives.
* @item
* TRG routines that provided active database support. [DEPRECATED]
* @item
- * ALIGN routines that implement BAT alignment management.
+ * ALIGN routines that implement COL alignment management.
* @end itemize
*
- * The Binary Association Table (BAT) is the lowest level of storage
+ * The Binary Association Table (COL) is the lowest level of storage
* considered in the Goblin runtime system
* @tex
* [@cite{Goblin}]
* @end tex
- * . A BAT is a
+ * . A COL is a
* self-descriptive main-memory structure that represents the @strong{binary
* relationship} between two atomic types.
* The association can be defined over:
@@ -114,7 +114,7 @@
* Machine-word sized integers
* (32-bit on 32-bit systems, 64-bit on 64-bit systems).
* @item ptr:
- * Memory pointer values. DEPRECATED. Can only be stored in transient BATs.
+ * Memory pointer values. DEPRECATED. Can only be stored in transient COLs.
* @item flt:
* The IEEE @strong{float} type.
* @item dbl:
@@ -126,16 +126,16 @@
* @item bat:
* Bat descriptor. This allows for recursive adminstered tables, but
* severely complicates transaction management. Therefore, they
- * CAN ONLY BE STORED IN TRANSIENT BATs.
+ * CAN ONLY BE STORED IN TRANSIENT COLs.
* @end table
*
* This model can be used as a back-end model underlying other -higher
* level- models, in order to achieve @strong{better performance} and
* @strong{data independence} in one go. The relational model and
- * the object-oriented model can be mapped on BATs by vertically
+ * the object-oriented model can be mapped on COLs by vertically
* splitting every table (or class) for each attribute. Each such a
- * column is then stored in a BAT with type @strong{bat[oid,attribute]}, where
- * the unique object identifiers link tuples in the different BATs.
+ * column is then stored in a COL with type @strong{bat[oid,attribute]}, where
+ * the unique object identifiers link tuples in the different COLs.
* Relationship attributes in the object-oriented model hence are
* mapped to @strong{bat[oid,oid]} tables, being equivalent to the concept of
* @emph{join indexes}
@@ -156,7 +156,7 @@
* are derived from @strong{int} on 32-bits machines, but is derived from
@strong{lng}
* on 64 bits machines. This requires changes in only two lines of code each.
*
- * To accelerate lookup and search in BATs, GDK supports one built-in
+ * To accelerate lookup and search in COLs, GDK supports one built-in
* search accelerator: hash tables. We choose an implementation efficient
* for main-memory: bucket chained hash
* @tex
@@ -165,15 +165,15 @@
* . Alternatively, when the table is sorted, it will resort to merge-scan
* operations or binary lookups.
*
- * BATs are built on the concept of heaps, which are large pieces of main
+ * COLs are built on the concept of heaps, which are large pieces of main
* memory. They can also consist of virtual memory, in case the working
* set exceeds main-memory. In this case, GDK supports operations that
- * cluster the heaps of a BAT, in order to improve performance of its
+ * cluster the heaps of a COL, in order to improve performance of its
* main-memory.
*
*
* @- Rationale
- * The rationale for choosing a BAT as the building block for both
+ * The rationale for choosing a COL as the building block for both
* relational and object-oriented system is based on the following
* observations:
*
@@ -223,7 +223,7 @@
* .
* @end itemize
*
- * A RDBMS or OODBMS based on BATs strongly depends on our ability
+ * A RDBMS or OODBMS based on COLs strongly depends on our ability
* to efficiently support tuples and to handle small joins, respectively.
*
* The remainder of this document describes the Goblin Database kernel
@@ -238,12 +238,12 @@
*
* As already mentioned, these are the primary data structure of GDK.
* This chapter describes the kernel operations for creation, destruction
- * and basic manipulation of BATs and BUNs (i.e. tuples: Binary UNits).
+ * and basic manipulation of COLs and BUNs (i.e. tuples: Binary UNits).
*
- * @item @strong{BAT Buffer Pool:}
+ * @item @strong{COL Buffer Pool:}
*
- * All BATs are registered in the BAT Buffer Pool. This directory is used
- * to guide swapping in and out of BATs. Here we find routines that guide
+ * All COLs are registered in the COL Buffer Pool. This directory is used
+ * to guide swapping in and out of COLs. Here we find routines that guide
* this swapping process.
*
* @item @strong{GDK Extensibility:}
@@ -260,20 +260,20 @@
*
* @item @strong{Transaction Management:}
*
- * For the time being, we just provide BAT-grained concurrency and global
+ * For the time being, we just provide COL-grained concurrency and global
* transactions. Work is needed here.
*
- * @item @strong{BAT Alignment:}
- * Due to the mapping of multi-ary datamodels onto the BAT model,
- * we expect many correspondences among BATs, e.g. @emph{bat(oid,attr1),..
+ * @item @strong{COL Alignment:}
+ * Due to the mapping of multi-ary datamodels onto the COL model,
+ * we expect many correspondences among COLs, e.g. @emph{bat(oid,attr1),..
* bat(oid,attrN)} vertical decompositions. Frequent activities will be
* to jump from one attribute to the other (`bunhopping'). If the head
- * columns are equal lists in two BATs, merge or even array lookups
+ * columns are equal lists in two COLs, merge or even array lookups
* can be used instead of hash lookups. The alignment interface makes
* these relations explicitly manageable.
*
* In GDK, complex data models are mapped with DSM on binary tables.
- * Usually, one decomposes @emph{N}-ary relations into @emph{N} BATs with
+ * Usually, one decomposes @emph{N}-ary relations into @emph{N} COLs with
* an @strong{oid} in the head column, and the attribute in the tail column.
* There may well be groups of tables that have the same sets of
* @strong{oid}s, equally ordered. The alignment interface is intended to make
@@ -281,17 +281,17 @@
* situation, and use cheaper algorithms (like merge-join, or even array
* lookup) instead.
*
- * @item @strong{BAT Iterators:}
+ * @item @strong{COL Iterators:}
*
* Iterators are C macros that generally encapsulate a complex for-loop.
* They would be the equivalent of cursors in the SQL model. The macro
* interface (instead of a function call interface) is chosen to achieve
* speed when iterating main-memory tables.
*
- * @item @strong{Common BAT Operations:}
+ * @item @strong{Common COL Operations:}
*
- * These are much used operations on BATs, such as aggregate functions
- * and relational operators. They are implemented in terms of BAT- and
+ * These are much used operations on COLs, such as aggregate functions
+ * and relational operators. They are implemented in terms of COL- and
* BUN-manipulation GDK primitives.
* @end table
*
@@ -429,14 +429,14 @@
#define GDKPROP 6 /* use one spare! */
#define MONETHOME "MONETHOME"
#ifndef NATIVE_WIN32
-#define BATDIR "bat"
+#define COLDIR "bat"
#define DELDIR "bat/DELETE_ME"
#define BAKDIR "bat/BACKUP"
#define SUBDIR "bat/BACKUP/SUBCOMMIT"
#define LEFTDIR "bat/LEFTOVERS"
#define HCDIR "bat/HC"
#else
-#define BATDIR "bat"
+#define COLDIR "bat"
#define DELDIR "bat\\DELETE_ME"
#define BAKDIR "bat\\BACKUP"
#define SUBDIR "bat\\BACKUP\\SUBCOMMIT"
@@ -484,17 +484,17 @@
#endif
#define BOUND2BTRUE 2 /* TRUE, and bound to be so */
-#define IDLENGTH 64 /* maximum BAT id length */
-#define BATMARGIN 1.2 /* extra free margin for new heaps */
-#define BATTINY_BITS 8
-#define BATTINY ((BUN)1<<BATTINY_BITS) /* minimum allocation
buncnt for a BAT */
+#define IDLENGTH 64 /* maximum COL id length */
+#define COLMARGIN 1.2 /* extra free margin for new heaps */
+#define COLTINY_BITS 8
+#define COLTINY ((BUN)1<<COLTINY_BITS) /* minimum allocation
buncnt for a COL */
#define TYPE_void 0
#define TYPE_bit 1
#define TYPE_chr 2
#define TYPE_bte 3
#define TYPE_sht 4
-#define TYPE_bat 5 /* BAT id: index in BBPcache */
+#define TYPE_bat 5 /* COL id: index in BBPcache */
#define TYPE_int 6
#define TYPE_oid 7
#define TYPE_wrd 8
@@ -549,7 +549,7 @@
typedef char long_str[IDLENGTH]; /* standard GDK static string */
-typedef oid var_t; /* type used for heap index of var-sized BAT */
+typedef oid var_t; /* type used for heap index of var-sized COL */
#define SIZEOF_VAR_T SIZEOF_OID
#define VARFMT OIDFMT
@@ -574,7 +574,7 @@
#else
#define BUN_NONE ((BUN) LLONG_MAX)
#endif
-#define BUN_MAX (BUN_NONE - 1) /* maximum allowed size of a BAT */
+#define BUN_MAX (BUN_NONE - 1) /* maximum allowed size of a COL */
/*
* Checking and Error definitions:
@@ -612,9 +612,9 @@
CHECKDEBUG THRprintf(GDKout,"#Interpreting %s as %s.\n", \
ATOMname(t2), ATOMname(t1)); \
}
-#define BATcompatible(P1,P2) { \
- ERRORcheck(P1 == NULL, "BATcompatible: COL required\n"); \
- ERRORcheck(P2 == NULL, "BATcompatible: COL required\n"); \
+#define COLcompatible(P1,P2) { \
+ ERRORcheck(P1 == NULL, "COLcompatible: COL required\n"); \
+ ERRORcheck(P2 == NULL, "COLcompatible: COL required\n"); \
if (TYPEerror(COLtype(P1),COLtype(P2))) \
{ \
GDKerror("Incompatible operands.\n"); \
@@ -658,19 +658,19 @@
* -------------------------
*
* Having gone to the previous preliminary definitions, we will
- * now introduce the structure of Binary Association Tables (BATs)
+ * now introduce the structure of Binary Association Tables (COLs)
* in detail. They are the basic storage unit on which GDK is modelled.
*
- * The BAT holds an unlimited number of binary associations, called
+ * The COL holds an unlimited number of binary associations, called
* BUNs (@strong{Binary UNits}). The two attributes of a BUN are called
* @strong{head} (left) and @strong{tail} (right) in the remainder of this
* document.
*
* @c image{http://monetdb.cwi.nl/projects/monetdb-mk/imgs/bat1,,,,feps}
*
- * The above figure shows what a BAT looks like. It consists of two
+ * The above figure shows what a COL looks like. It consists of two
* columns, called head and tail, such that we have always binary tuples
- * (BUNs). The overlooking structure is the @strong{BAT record}.
+ * (BUNs). The overlooking structure is the @strong{COL record}.
* It points to a heap structure called the @strong{BUN heap}.
* This heap contains the atomic values inside the two columns. If they
* are fixed-sized atoms, these atoms reside directly in the BUN heap. If
@@ -692,15 +692,15 @@
* @-
* --
*
- * The location of a certain BUN in a BAT
+ * The location of a certain BUN in a COL
* may change between successive library routine invocations. Therefore, one
- * should avoid keeping references into the BAT storage area for long
+ * should avoid keeping references into the COL storage area for long
* periods.
*
* Passing values between the library routines and the enclosing C
* program is primarily through value pointers of type @%ptr@. Pointers
- * into the BAT storage area should only be used for retrieval. Direct
- * updates of data stored in a BAT is forbidden. The user should adhere
+ * into the COL storage area should only be used for retrieval. Direct
+ * updates of data stored in a COL is forbidden. The user should adhere
* to the interface conventions to guarantee the integrity rules and to
* maintain the (hidden) auxiliary search structures.
*
@@ -757,23 +757,23 @@
/*
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list