Changeset: c7a4c040dd5a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c7a4c040dd5a
Added Files:
        sql/backends/monet5/Tests/rapi01.sql
        sql/backends/monet5/Tests/rapi02.sql
Modified Files:
        sql/backends/monet5/Tests/All
        sql/backends/monet5/Tests/rapi00.sql
Branch: RIntegration
Log Message:

Two more steps for SQL/R to solve


diffs (98 lines):

diff --git a/sql/backends/monet5/Tests/All b/sql/backends/monet5/Tests/All
--- a/sql/backends/monet5/Tests/All
+++ b/sql/backends/monet5/Tests/All
@@ -1,6 +1,8 @@
 optimizers
 
 rapi00
+rapi01
+rapi02
 
 inlineR
 inlineUDF
diff --git a/sql/backends/monet5/Tests/rapi00.sql 
b/sql/backends/monet5/Tests/rapi00.sql
--- a/sql/backends/monet5/Tests/rapi00.sql
+++ b/sql/backends/monet5/Tests/rapi00.sql
@@ -1,28 +1,14 @@
 -- MonetDB R interface
 
-create table rapitable(i integer);
-insert into rapitable values
-(1804289383),
-(846930886),
-(1681692777),
-(1714636915),
-(1957747793),
-(424238335),
-(719885386),
-(1649760492),
-(596516649),
-(1189641421);
-
-select * from rapitable;
-
 create function rapi00() returns table (d float)
 language R {
+       arg1 <- c(1804289383, 846930886, 1681692777, 1714636915, 1957747793, 
424238335, 719885386, 1649760492, 596516649, 1189641421);
        someval <- Re(fft(arg1)); return(someval);
 };
 
 select * from functions where name = 'rapi00';
 
 explain select * from rapi00() as R;
+select * from rapi00() as R;
 
 drop function rapi00;
-drop table rapitable;
diff --git a/sql/backends/monet5/Tests/rapi01.sql 
b/sql/backends/monet5/Tests/rapi01.sql
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/Tests/rapi01.sql
@@ -0,0 +1,28 @@
+-- MonetDB R interface
+
+create table rapitable(i integer);
+insert into rapitable values
+(1804289383),
+(846930886),
+(1681692777),
+(1714636915),
+(1957747793),
+(424238335),
+(719885386),
+(1649760492),
+(596516649),
+(1189641421);
+
+select * from rapitable;
+
+create function rapi01(i integer) returns table (d float)
+language R {
+       someval <- Re(fft(arg1)); return(someval);
+};
+
+select * from functions where name = 'rapi01';
+
+explain select * from rapi01() as R;
+
+drop function rapi01;
+drop table rapitable;
diff --git a/sql/backends/monet5/Tests/rapi02.sql 
b/sql/backends/monet5/Tests/rapi02.sql
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/Tests/rapi02.sql
@@ -0,0 +1,14 @@
+-- MonetDB R interface
+
+-- testing robustness, should not cause a segfault
+create function rapi00(i integer) returns table (d float)
+language R {
+       arg1 <- c(1804289383, 846930886, 1681692777, 1714636915, 1957747793, 
424238335, 719885386, 1649760492, 596516649, 1189641421);
+       someval <- Re(fft(arg1)); return(someval);
+};
+
+select * from functions where name = 'rapi00';
+
+explain select * from rapi00() as R;
+
+drop function rapi00;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to