Changeset: 4446fb00cf39 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4446fb00cf39
Removed Files:
monetdb5/mal/Tests/tst1005.mal
monetdb5/mal/Tests/tst1005.stable.err
monetdb5/mal/Tests/tst1005.stable.out
monetdb5/mal/Tests/tst1014.mal
monetdb5/mal/Tests/tst1014.stable.err
monetdb5/mal/Tests/tst1014.stable.out
monetdb5/mal/Tests/tst2560.mal
monetdb5/mal/Tests/tst2560.stable.err
monetdb5/mal/Tests/tst2560.stable.out
monetdb5/mal/Tests/tst600.mal
monetdb5/mal/Tests/tst600.stable.err
monetdb5/mal/Tests/tst600.stable.out
monetdb5/mal/Tests/tst610.mal
monetdb5/mal/Tests/tst610.stable.err
monetdb5/mal/Tests/tst610.stable.out
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/exports.stable.out
monetdb5/mal/Tests/All
monetdb5/mal/Tests/tst1002.mal
monetdb5/mal/Tests/tst1002.stable.out
monetdb5/mal/Tests/tst1004.mal
monetdb5/mal/Tests/tst1004.stable.out
monetdb5/mal/Tests/tst1012.mal
monetdb5/mal/Tests/tst1012.stable.out
monetdb5/mal/Tests/tst232.mal
monetdb5/mal/Tests/tst232.stable.out
monetdb5/mal/Tests/tst3000.mal
monetdb5/mal/Tests/tst3000.stable.out
monetdb5/modules/mal/bbp.c
monetdb5/modules/mal/bbp.h
monetdb5/modules/mal/bbp.mal
Branch: default
Log Message:
Remove Box semantics from bbp
The box semantics was not really exploited in all those year.
Let it reduce it again to its core, a wrapper for debugging
the BBP and some utilities.
diffs (truncated from 1949 to 300 lines):
diff --git a/clients/Tests/MAL-signatures.stable.out
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -32102,14 +32102,6 @@ command bat.unload(name:str):bit
address BKCunload;
comment Swapout a BAT to disk. Transient BATs can also be swapped out.
Returns whether the unload indeed happened.
-pattern bbp.bind(idx:int):bat[:oid,:any_2]
-address CMDbbpbindindex;
-comment Locate the BAT using its BBP index in the BAT buffer pool
-
-pattern bbp.bind(head:str,tail:str):bat[:oid,:any_2]
-address CMDbbpbind2;
-comment Locate the BAT using the head and tail names in the BAT buffer pool
-
pattern bbp.bind(name:str):bat[:oid,:any_2]
address CMDbbpbind;
comment Locate the BAT using its logical name
@@ -32118,46 +32110,10 @@ command bbp.compress(b:bat[:oid,:any_2],
address CMDbbpcompress;
comment Generate a compressed image of the BAT on a specific file
-pattern bbp.commit():void
-address CMDbbpReleaseAll;
-comment Commit updates for this client.
-
-command bbp.commit(b:bat[:oid,:any_2]):void
-address CMDbbpSubCommit;
-comment Commit updates for single BAT.
-
-command bbp.close():void
-address CMDbbpclose;
-comment Close the bbp box.
-
command bbp.decompress(b:bat[:oid,:any_2],fnme:str):bat[:oid,:any_2]
address CMDbbpdecompress;
comment Obtain a temporary decompressed image of a BAT from a specific file
-pattern bbp.discard(name:str):void
-address CMDbbpdiscard;
-comment Remove the BAT from the box.
-
-pattern bbp.destroy(b:bat[:oid,:any_2],immediate:bit):void
-address CMDbbpdestroyBAT;
-comment Schedule a BAT for removal at session end or immediately.
-
-pattern bbp.destroy(b:bat[:oid,:any_2]):void
-address CMDbbpdestroyBAT1;
-comment Schedule a BAT for removal at session end.
-
-pattern bbp.deposit(name:str,loc:str):bat[:oid,:any_2]
-address CMDbbpbindDefinition;
-comment Relate a logical name to a physical BAT in the buffer pool.
-
-pattern bbp.deposit(name:str,v:bat[:oid,:any_2]):void
-address CMDbbpdeposit;
-comment Enter a new bat into the bbp box.
-
-command bbp.destroy():void
-address CMDbbpdestroy;
-comment Destroy the box
-
command bbp.expand(b:bat[:oid,:any_2],fnme:str):bat[:oid,:any_2]
address CMDbbpexpand;
comment Expand a compressed image of BAT heaps
@@ -32218,62 +32174,22 @@ command bbp.get() (id:bat[:oid,:int],ns:
address CMDbbp;
comment bpp
-command bbp.getRNames():bat[:oid,:str]
-address CMDbbpRNames;
-comment Map a BAT into its bbp physical name
-
command bbp.getNames():bat[:oid,:str]
address CMDbbpNames;
comment Map BAT into its bbp name
-command bbp.getType():bat[:oid,:str]
-address CMDbbpType;
-comment Map a BAT into its tail type
-
command bbp.getIndex(b:bat[:oid,:any_2]):int
address CMDbbpgetIndex;
comment Retrieve the index in the BBP
-pattern bbp.getObjects():bat[:oid,:str]
-address CMDbbpGetObjects;
-comment View of the box content.
-
-pattern bbp.iterator(nme:str):lng
-address CMDbbpiterator;
-comment Locate the next element in the box.
-
-command bbp.open():void
-address CMDbbpopen;
-comment Locate the bbp box and open it.
-
pattern bbp.prelude():void
address CMDbbpprelude;
comment Initialize the bbp box.
-pattern bbp.release(b:bat[:oid,:any_2]):void
-address CMDbbpreleaseBAT;
-comment Remove the BAT from further consideration
-
-pattern bbp.release(name:str,val:bat[:oid,:any_2]):void
-address CMDbbprelease;
-comment Commit updates and release this BAT.
-
-pattern bbp.releaseAll():void
-address CMDbbpReleaseAll;
-comment Commit updates for this client.
-
command bbp.truncate(b:bat[:oid,:any_2],fnme:str):bat[:oid,:any_2]
address CMDbbptruncate;
comment Truncate the heaps if a compressed image exist
-pattern bbp.toString(name:str):str
-address CMDbbptoStr;
-comment Get the string representation of an element in the box.
-
-pattern bbp.take(name:str):bat[:oid,:any_2]
-address CMDbbptake;
-comment Load a particular bat.
-
command blob.blob(s:str):blob
address BLOBblob_fromstr;
command blob.blob(s:blob):blob
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1192,7 +1192,6 @@ str CMDbbpDirty(int *ret);
str CMDbbpDiskReads(lng *ret);
str CMDbbpDiskSpace(lng *ret);
str CMDbbpDiskWrites(lng *ret);
-str CMDbbpGetObjects(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CMDbbpHeat(int *ret);
str CMDbbpKind(int *ret);
str CMDbbpLRefCount(int *ret);
@@ -1201,31 +1200,13 @@ str CMDbbpName(str *ret, int *bid);
str CMDbbpNames(int *ret);
str CMDbbpRNames(int *ret);
str CMDbbpRefCount(int *ret);
-str CMDbbpReleaseAll(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CMDbbpStatus(int *ret);
-str CMDbbpSubCommit(int *ret, int *bid);
-str CMDbbpType(int *ret);
str CMDbbpbind(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CMDbbpbind2(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
-str CMDbbpbindDefinition(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
pci);
-str CMDbbpbindindex(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CMDbbpclose(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CMDbbpcompress(int *ret, int *bid, str *fnme);
str CMDbbpdecompress(int *ret, int *bid, str *fnme);
-str CMDbbpdeposit(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CMDbbpdestroy(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CMDbbpdestroyBAT(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CMDbbpdestroyBAT1(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CMDbbpdiscard(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CMDbbpexpand(int *ret, int *bid, str *fnme);
str CMDbbpgetIndex(int *res, int *bid);
-str CMDbbpiterator(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CMDbbpopen(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CMDbbpprelude(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CMDbbprelease(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CMDbbpreleaseBAT(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CMDbbptake(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CMDbbptoStr(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CMDbbptruncate(int *ret, int *bid, str *fnme);
str CMDcalcavg(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CMDcallBAT(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
@@ -1485,11 +1466,15 @@ str JSONunfold(Client cntxt, MalBlkPtr m
str JSONvalueArray(json *ret, json *arg);
str JSONvalueTable(int *ret, json *j);
str KVdatabase(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+str KVdropdatabase(str name);
str KVepilogue(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str KVget(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+str KVget(str dbkey, str name, ValPtr val, int tpe);
str KVgetAll(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+str KVnewdatabase(str name, str tpe);
str KVprelude(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str KVput(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+str KVput(str dbkey, str name, ValPtr val, int tpe);
str LCKcreate(monet_lock *l);
str LCKdestroy(int *res, monet_lock *l);
str LCKset(int *res, monet_lock *l);
diff --git a/monetdb5/mal/Tests/All b/monetdb5/mal/Tests/All
--- a/monetdb5/mal/Tests/All
+++ b/monetdb5/mal/Tests/All
@@ -67,10 +67,8 @@ tst100
tst1000
tst1002
tst1004
-tst1005
tst101
tst1012
-tst1014
tst102
tst103
tst104
@@ -133,7 +131,6 @@ tst253
tst255
tst2550
tst256
-tst2560
tst260
tst2570
# tst265 -- windowsum and slidingsum have been removed
@@ -166,12 +163,10 @@ tst500
tst501
tst550
tst560
-tst600
tst601
tst605
tst606
tst607
-tst610
tst611
tst612
tst620
diff --git a/monetdb5/mal/Tests/tst1002.mal b/monetdb5/mal/Tests/tst1002.mal
--- a/monetdb5/mal/Tests/tst1002.mal
+++ b/monetdb5/mal/Tests/tst1002.mal
@@ -1,10 +1,8 @@
# the first of a series of BBP test cases
# the temporary bat produced in tst1000 should not exist anymore
-bbp.open();
-c:= bbp.take("myfirstbat");
+c:bat[:oid,:int]:= bbp.bind("myfirstbat");
io.print(c);
-bbp.close();
catch MALException:str;
io.printf("%s\n",MALException);
exit MALException;
diff --git a/monetdb5/mal/Tests/tst1002.stable.out
b/monetdb5/mal/Tests/tst1002.stable.out
--- a/monetdb5/mal/Tests/tst1002.stable.out
+++ b/monetdb5/mal/Tests/tst1002.stable.out
@@ -28,15 +28,13 @@ stdout of test 'tst1002` in directory 'm
function user.main():void;
# the first of a series of BBP test cases
# the temporary bat produced in tst1000 should not exist anymore
- bbp.open();
- c := bbp.take("myfirstbat");
+ c:bat[:oid,:int] := bbp.bind("myfirstbat");
io.print(c);
- bbp.close();
catch MALException:str ;
io.printf("%s\n",MALException);
exit MALException:str ;
end main;
-MALException:bbp.take:Object not found
+MALException:bbp.bind:Object not found
# 07:58:52 >
# 07:58:52 > Done.
diff --git a/monetdb5/mal/Tests/tst1004.mal b/monetdb5/mal/Tests/tst1004.mal
--- a/monetdb5/mal/Tests/tst1004.mal
+++ b/monetdb5/mal/Tests/tst1004.mal
@@ -1,28 +1,12 @@
# the first of a series of BBP test cases
io.print("Start test");
-bbp.open();
b:= bat.new(:oid,:int);
+bat.setName(b,"myfirstbat");
bat.append(b,2);
-bbp.deposit("myfirstbat",b);
-c:= bbp.take("myfirstbat");
+c:bat[:oid,:int] := bbp.bind("myfirstbat");
catch MALException:str;
io.print(MALException);
exit MALException;
io.print("FIRST ROUND");
io.print(c);
-bbp.close();
-# at the end of the session, the BBP should have discarded
-# the temporary bats of the user
-bbp.open();
-io.print("SECOND ROUND");
-y:=bbp.getObjects();
-yr:= bat.reverse(y);
-yp:= algebra.project(yr);
-io.print(yp);
-v:= bbp.take("myfirstbat");
-catch MALException:str;
- io.print(MALException);
-exit MALException;
-io.print("got myfirstbat?");
-io.print(v);
diff --git a/monetdb5/mal/Tests/tst1004.stable.out
b/monetdb5/mal/Tests/tst1004.stable.out
--- a/monetdb5/mal/Tests/tst1004.stable.out
+++ b/monetdb5/mal/Tests/tst1004.stable.out
@@ -45,50 +45,22 @@ stdout of test 'tst1004` in directory 'm
function user.main():void;
# the first of a series of BBP test cases
io.print("Start test");
- bbp.open();
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list