Changeset: 69ae2b250bd3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=69ae2b250bd3
Added Files:
        sql/backends/monet5/Tests/rapi17.stable.err
        sql/backends/monet5/Tests/rapi17.stable.out
Modified Files:
        monetdb5/extras/rapi/rapi.c
Branch: Jul2015
Log Message:

fixed rapi17, ie properly address var sized atoms in the result bat
(grafted from 43d3b72681910dd73f9c1ba294dcdfccf8c34d38)


diffs (107 lines):

diff --git a/monetdb5/extras/rapi/rapi.c b/monetdb5/extras/rapi/rapi.c
--- a/monetdb5/extras/rapi/rapi.c
+++ b/monetdb5/extras/rapi/rapi.c
@@ -721,8 +721,10 @@ str RAPIeval(Client cntxt, MalBlkPtr mb,
                        *getArgReference_bat(stk, pci, i) = b->batCacheid;
                        BBPkeepref(b->batCacheid);
                } else { // single value return, only for non-grouped 
aggregations
+                       BATiter bi = bat_iterator(b);
+
                        VALinit(&stk->stk[pci->argv[i]], bat_type,
-                                       Tloc(b, BUNfirst(b)));
+                                       BUNtail(bi, BUNfirst(b)));
                }
                msg = MAL_SUCCEED;
        }
diff --git a/sql/backends/monet5/Tests/rapi17.stable.err 
b/sql/backends/monet5/Tests/rapi17.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/Tests/rapi17.stable.err
@@ -0,0 +1,37 @@
+stderr of test 'rapi17` in directory 'sql/backends/monet5` itself:
+
+
+# 19:11:49 >  
+# 19:11:49 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=34107" "--set" 
"mapi_usock=/var/tmp/mtest-5415/.s.monetdb.34107" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_backends_monet5"
 "--set" "mal_listing=0" "--set" "embedded_r=yes"
+# 19:11:49 >  
+
+# builtin opt  gdk_dbpath = 
/home/niels/scratch/monetdb/Linux-x86_64/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 = 34107
+# cmdline opt  mapi_usock = /var/tmp/mtest-5415/.s.monetdb.34107
+# cmdline opt  monet_prompt = 
+# cmdline opt  mal_listing = 2
+# cmdline opt  gdk_dbpath = 
/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_backends_monet5
+# cmdline opt  mal_listing = 0
+# cmdline opt  embedded_r = yes
+# cmdline opt  gdk_debug = 536870922
+
+# 19:11:49 >  
+# 19:11:49 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-5415" "--port=34107"
+# 19:11:49 >  
+
+
+# 19:11:49 >  
+# 19:11:49 >  "Done."
+# 19:11:49 >  
+
diff --git a/sql/backends/monet5/Tests/rapi17.stable.out 
b/sql/backends/monet5/Tests/rapi17.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/Tests/rapi17.stable.out
@@ -0,0 +1,45 @@
+stdout of test 'rapi17` in directory 'sql/backends/monet5` itself:
+
+
+# 19:11:49 >  
+# 19:11:49 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=34107" "--set" 
"mapi_usock=/var/tmp/mtest-5415/.s.monetdb.34107" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_backends_monet5"
 "--set" "mal_listing=0" "--set" "embedded_r=yes"
+# 19:11:49 >  
+
+# MonetDB 5 server v11.22.0
+# This is an unreleased version
+# Serving database 'mTests_sql_backends_monet5', using 4 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit 
integers dynamically linked
+# Found 7.333 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://localhost.nes.nl:34107/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-5415/.s.monetdb.34107
+# MonetDB/GIS module loaded
+# Start processing logs sql/sql_logs version 52200
+# Start reading the write-ahead log 'sql_logs/sql/log.4'
+# Finished reading the write-ahead log 'sql_logs/sql/log.4'
+# Finished processing logs sql/sql_logs
+# MonetDB/SQL module loaded
+# MonetDB/R   module loaded
+
+Ready.
+
+# 19:11:49 >  
+# 19:11:49 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-5415" "--port=34107"
+# 19:11:49 >  
+
+#START TRANSACTION;
+#create function dt(d date) returns string language R { class(d) };
+#select dt( cast('2015-09-21' as date) );
+% .L1 # table_name
+% dt_single_value # name
+% clob # type
+% 7 # length
+[ "integer"    ]
+#ROLLBACK;
+
+# 19:11:49 >  
+# 19:11:49 >  "Done."
+# 19:11:49 >  
+
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to