Changeset: b8de243d2e6c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b8de243d2e6c
Removed Files:
        monetdb5/modules/mal/Tests/pqueueElim.mal
        monetdb5/modules/mal/Tests/pqueueElim.stable.err
        monetdb5/modules/mal/Tests/pqueueElim.stable.out
Modified Files:
        monetdb5/modules/mal/Tests/All
        monetdb5/modules/mal/Tests/pqueue.mal
        monetdb5/modules/mal/Tests/pqueue.stable.out
        monetdb5/modules/mal/pqueue.c
Branch: default
Log Message:

Fix boundary condition in pqueue
Still optimization of sorted input should be done.


diffs (truncated from 434 to 300 lines):

diff --git a/monetdb5/modules/mal/Tests/All b/monetdb5/modules/mal/Tests/All
--- a/monetdb5/modules/mal/Tests/All
+++ b/monetdb5/modules/mal/Tests/All
@@ -82,4 +82,3 @@ clients-getpasswd
 
 pqueue
 pqueue2
-pqueueElim
diff --git a/monetdb5/modules/mal/Tests/pqueue.mal 
b/monetdb5/modules/mal/Tests/pqueue.mal
--- a/monetdb5/modules/mal/Tests/pqueue.mal
+++ b/monetdb5/modules/mal/Tests/pqueue.mal
@@ -11,41 +11,41 @@ bat.append(b,3);
 
 io.print(b);
 
-bp:= pqueue.topn_min(b,0:wrd,false);
+bp:= pqueue.topn_min(b,0:wrd);
 io.print(bp);
-bp:= pqueue.topn_min(b,1:wrd,false);
+bp:= pqueue.topn_min(b,1:wrd);
 io.print(bp);
-bp:= pqueue.topn_min(b,2:wrd,false);
+bp:= pqueue.topn_min(b,2:wrd);
 io.print(bp);
-bp:= pqueue.topn_min(b,3:wrd,false);
+bp:= pqueue.topn_min(b,3:wrd);
 io.print(bp);
-bp:= pqueue.topn_min(b,4:wrd,false);
+bp:= pqueue.topn_min(b,4:wrd);
 io.print(bp);
-bp:= pqueue.topn_min(b,5:wrd,false);
+bp:= pqueue.topn_min(b,5:wrd);
 io.print(bp);
-bp:= pqueue.topn_min(b,6:wrd,false);
+bp:= pqueue.topn_min(b,6:wrd);
 io.print(bp);
-bp:= pqueue.topn_min(b,7:wrd,false);
+bp:= pqueue.topn_min(b,7:wrd);
 io.print(bp);
-bp:= pqueue.topn_min(b,8:wrd,false);
+bp:= pqueue.topn_min(b,8:wrd);
 io.print(bp);
 
-bp:= pqueue.topn_max(b,0:wrd,false);
+bp:= pqueue.topn_max(b,0:wrd);
 io.print(bp);
-bp:= pqueue.topn_max(b,1:wrd,false);
+bp:= pqueue.topn_max(b,1:wrd);
 io.print(bp);
-bp:= pqueue.topn_max(b,2:wrd,false);
+bp:= pqueue.topn_max(b,2:wrd);
 io.print(bp);
-bp:= pqueue.topn_max(b,3:wrd,false);
+bp:= pqueue.topn_max(b,3:wrd);
 io.print(bp);
-bp:= pqueue.topn_max(b,4:wrd,false);
+bp:= pqueue.topn_max(b,4:wrd);
 io.print(bp);
-bp:= pqueue.topn_max(b,5:wrd,false);
+bp:= pqueue.topn_max(b,5:wrd);
 io.print(bp);
-bp:= pqueue.topn_max(b,6:wrd,false);
+bp:= pqueue.topn_max(b,6:wrd);
 io.print(bp);
-bp:= pqueue.topn_max(b,7:wrd,false);
+bp:= pqueue.topn_max(b,7:wrd);
 io.print(bp);
-bp:= pqueue.topn_max(b,8:wrd,false);
+bp:= pqueue.topn_max(b,8:wrd);
 io.print(bp);
 
diff --git a/monetdb5/modules/mal/Tests/pqueue.stable.out 
b/monetdb5/modules/mal/Tests/pqueue.stable.out
--- a/monetdb5/modules/mal/Tests/pqueue.stable.out
+++ b/monetdb5/modules/mal/Tests/pqueue.stable.out
@@ -29,41 +29,41 @@ function user.main():void;
     bat.append(b,5);
     bat.append(b,3);
     io.print(b);
-    bp := pqueue.topn_min(b,0:wrd,false);
+    bp := pqueue.topn_min(b,0:wrd);
     io.print(bp);
-    bp := pqueue.topn_min(b,1:wrd,false);
+    bp := pqueue.topn_min(b,1:wrd);
     io.print(bp);
-    bp := pqueue.topn_min(b,2:wrd,false);
+    bp := pqueue.topn_min(b,2:wrd);
     io.print(bp);
-    bp := pqueue.topn_min(b,3:wrd,false);
+    bp := pqueue.topn_min(b,3:wrd);
     io.print(bp);
-    bp := pqueue.topn_min(b,4:wrd,false);
+    bp := pqueue.topn_min(b,4:wrd);
     io.print(bp);
-    bp := pqueue.topn_min(b,5:wrd,false);
+    bp := pqueue.topn_min(b,5:wrd);
     io.print(bp);
-    bp := pqueue.topn_min(b,6:wrd,false);
+    bp := pqueue.topn_min(b,6:wrd);
     io.print(bp);
-    bp := pqueue.topn_min(b,7:wrd,false);
+    bp := pqueue.topn_min(b,7:wrd);
     io.print(bp);
-    bp := pqueue.topn_min(b,8:wrd,false);
+    bp := pqueue.topn_min(b,8:wrd);
     io.print(bp);
-    bp := pqueue.topn_max(b,0:wrd,false);
+    bp := pqueue.topn_max(b,0:wrd);
     io.print(bp);
-    bp := pqueue.topn_max(b,1:wrd,false);
+    bp := pqueue.topn_max(b,1:wrd);
     io.print(bp);
-    bp := pqueue.topn_max(b,2:wrd,false);
+    bp := pqueue.topn_max(b,2:wrd);
     io.print(bp);
-    bp := pqueue.topn_max(b,3:wrd,false);
+    bp := pqueue.topn_max(b,3:wrd);
     io.print(bp);
-    bp := pqueue.topn_max(b,4:wrd,false);
+    bp := pqueue.topn_max(b,4:wrd);
     io.print(bp);
-    bp := pqueue.topn_max(b,5:wrd,false);
+    bp := pqueue.topn_max(b,5:wrd);
     io.print(bp);
-    bp := pqueue.topn_max(b,6:wrd,false);
+    bp := pqueue.topn_max(b,6:wrd);
     io.print(bp);
-    bp := pqueue.topn_max(b,7:wrd,false);
+    bp := pqueue.topn_max(b,7:wrd);
     io.print(bp);
-    bp := pqueue.topn_max(b,8:wrd,false);
+    bp := pqueue.topn_max(b,8:wrd);
     io.print(bp);
 end main;
 #--------------------------#
diff --git a/monetdb5/modules/mal/Tests/pqueueElim.mal 
b/monetdb5/modules/mal/Tests/pqueueElim.mal
deleted file mode 100644
--- a/monetdb5/modules/mal/Tests/pqueueElim.mal
+++ /dev/null
@@ -1,31 +0,0 @@
-# enqueue something 
-b:= bat.new(:oid,:int);
-
-bat.append(b,1);
-bat.append(b,0);
-bat.append(b,2);
-bat.append(b,2);
-bat.append(b,5);
-bat.append(b,5);
-bat.append(b,3);
-
-io.print(b);
-
-bp:= pqueue.topn_min(b,0:wrd,true);
-io.print(bp);
-bp:= pqueue.topn_min(b,1:wrd,true);
-io.print(bp);
-bp:= pqueue.topn_min(b,2:wrd,true);
-io.print(bp);
-bp:= pqueue.topn_min(b,3:wrd,true);
-io.print(bp);
-bp:= pqueue.topn_min(b,4:wrd,true);
-io.print(bp);
-bp:= pqueue.topn_min(b,5:wrd,true);
-io.print(bp);
-bp:= pqueue.topn_min(b,6:wrd,true);
-io.print(bp);
-bp:= pqueue.topn_min(b,7:wrd,true);
-io.print(bp);
-bp:= pqueue.topn_min(b,8:wrd,true);
-io.print(bp);
diff --git a/monetdb5/modules/mal/Tests/pqueueElim.stable.err 
b/monetdb5/modules/mal/Tests/pqueueElim.stable.err
deleted file mode 100644
--- a/monetdb5/modules/mal/Tests/pqueueElim.stable.err
+++ /dev/null
@@ -1,30 +0,0 @@
-stderr of test 'pqueueElim` in directory 'monetdb5/modules/mal` itself:
-
-
-# 22:54:13 >  
-# 22:54:13 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=38195" "--set" 
"mapi_usock=/var/tmp/mtest-25516/.s.monetdb.38195" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/export/scratch1/mk/current//Linux/var/MonetDB/mTests_monetdb5_modules_mal"
 "pqueueElim.mal"
-# 22:54:13 >  
-
-# builtin opt  gdk_dbpath = 
/export/scratch1/mk/current//Linux/var/monetdb5/dbfarm/demo
-# builtin opt  gdk_debug = 0
-# builtin opt  gdk_vmtrim = no
-# builtin opt  monet_prompt = >
-# builtin opt  monet_daemon = no
-# builtin opt  mapi_port = 50000
-# builtin opt  mapi_open = false
-# builtin opt  mapi_autosense = false
-# builtin opt  sql_optimizer = default_pipe
-# builtin opt  sql_debug = 0
-# cmdline opt  gdk_nr_threads = 0
-# cmdline opt  mapi_open = true
-# cmdline opt  mapi_port = 38195
-# cmdline opt  mapi_usock = /var/tmp/mtest-25516/.s.monetdb.38195
-# cmdline opt  monet_prompt = 
-# cmdline opt  mal_listing = 2
-# cmdline opt  gdk_dbpath = 
/export/scratch1/mk/current//Linux/var/MonetDB/mTests_monetdb5_modules_mal
-# cmdline opt  gdk_debug = 536870922
-
-# 22:54:13 >  
-# 22:54:13 >  "Done."
-# 22:54:13 >  
-
diff --git a/monetdb5/modules/mal/Tests/pqueueElim.stable.out 
b/monetdb5/modules/mal/Tests/pqueueElim.stable.out
deleted file mode 100644
--- a/monetdb5/modules/mal/Tests/pqueueElim.stable.out
+++ /dev/null
@@ -1,132 +0,0 @@
-stdout of test 'pqueueElim` in directory 'monetdb5/modules/mal` itself:
-
-
-# 22:54:13 >  
-# 22:54:13 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=38195" "--set" 
"mapi_usock=/var/tmp/mtest-25516/.s.monetdb.38195" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/export/scratch1/mk/current//Linux/var/MonetDB/mTests_monetdb5_modules_mal"
 "pqueueElim.mal"
-# 22:54:13 >  
-
-# MonetDB 5 server v11.18.0
-# This is an unreleased version
-# Serving database 'mTests_monetdb5_modules_mal', using 8 threads
-# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
-# Found 15.591 GiB available main-memory.
-# Copyright (c) 1993-July 2008 CWI.
-# Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved
-# Visit http://www.monetdb.org/ for further information
-# Listening for connection requests on mapi:monetdb://vienna.ins.cwi.nl:38195/
-# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-25516/.s.monetdb.38195
-# MonetDB/GIS module loaded
-# MonetDB/JAQL module loaded
-# MonetDB/SQL module loaded
-function user.main():void;
-# enqueue something  
-    b := bat.new(:oid,:int);
-    bat.append(b,1);
-    bat.append(b,0);
-    bat.append(b,2);
-    bat.append(b,2);
-    bat.append(b,5);
-    bat.append(b,5);
-    bat.append(b,3);
-    io.print(b);
-    bp := pqueue.topn_min(b,0:wrd,true);
-    io.print(bp);
-    bp := pqueue.topn_min(b,1:wrd,true);
-    io.print(bp);
-    bp := pqueue.topn_min(b,2:wrd,true);
-    io.print(bp);
-    bp := pqueue.topn_min(b,3:wrd,true);
-    io.print(bp);
-    bp := pqueue.topn_min(b,4:wrd,true);
-    io.print(bp);
-    bp := pqueue.topn_min(b,5:wrd,true);
-    io.print(bp);
-    bp := pqueue.topn_min(b,6:wrd,true);
-    io.print(bp);
-    bp := pqueue.topn_min(b,7:wrd,true);
-    io.print(bp);
-    bp := pqueue.topn_min(b,8:wrd,true);
-    io.print(bp);
-end main;
-#--------------------------#
-# h    t  # name
-# void int  # type
-#--------------------------#
-[ 0@0, 1  ]
-[ 1@0, 0  ]
-[ 2@0, 2  ]
-[ 3@0, 2  ]
-[ 4@0, 5  ]
-[ 5@0, 5  ]
-[ 6@0, 3  ]
-#--------------------------#
-# h    t  # name
-# void oid  # type
-#--------------------------#
-#--------------------------#
-# h    t  # name
-# void oid  # type
-#--------------------------#
-[ 0@0, 1@0  ]
-#--------------------------#
-# h    t  # name
-# void oid  # type
-#--------------------------#
-[ 0@0, 1@0  ]
-[ 1@0, 0@0  ]
-#--------------------------#
-# h    t  # name
-# void oid  # type
-#--------------------------#
-[ 0@0, 1@0  ]
-[ 1@0, 0@0  ]
-[ 2@0, 2@0  ]
-#--------------------------#
-# h    t  # name
-# void oid  # type
-#--------------------------#
-[ 0@0, 1@0  ]
-[ 1@0, 0@0  ]
-[ 2@0, 2@0  ]
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to