changeset 39:4633ab41de55

Layout and some small fixes for Oct2020 release of MonetDB.
author Sjoerd Mullender <sjoerd@acm.org>
date Tue, 08 Jun 2021 11:58:34 +0200 (2021-06-08)
parents d3a47663cb28
children e70b12c15507
files regexp/regexp.c reverse/MonetDB-reverse.spec reverse/reverse.c
diffstat 3 files changed, 46 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/regexp/regexp.c	Tue Jun 08 11:39:36 2021 +0200
+++ b/regexp/regexp.c	Tue Jun 08 11:58:34 2021 +0200
@@ -684,15 +684,31 @@
 static char regexp_sql[] = "CREATE FILTER FUNCTION rematch(val STRING, pat STRING) EXTERNAL NAME regexp.rematch; CREATE FILTER FUNCTION rematch(val STRING, pat STRING, flags STRING) EXTERNAL NAME regexp.rematch;";
 
 static mel_func regexp_init_funcs[] = {
- command("regexp", "rematch", regexpmatch, false, "Return true when the value 'val' matches the regular expression 'pat'", args(1,3, arg("",bit),arg("val",str),arg("pat",str))),
- command("regexp", "rematchselect", regexpmatchselect, false, "Return the list of matches in 'val' that match the regular expression 'pat'", args(1,5, batarg("",oid),batarg("val",str),batarg("cand",oid),arg("pat",str),arg("anti",bit))),
- command("regexp", "rematchjoin", regexpmatchjoin, false, "Return the matching pairs from the 'val' and 'pat' columns", args(2,8, batarg("lr",oid),batarg("rr",oid),batarg("val",str),batarg("pat",str),batarg("sl",oid),batarg("sr",oid),arg("nil_matches",bit),arg("estimate",lng))),
- command("regexp", "rematch", regexpmatchf, false, "Return true when the value 'val' matches the regular expression 'pat'", args(1,4, arg("",bit),arg("val",str),arg("pat",str),arg("flags",str))),
- command("regexp", "rematchselect", regexpmatchfselect, false, "Return the list of matches in 'val' that match the regular expression 'pat'", args(1,6, batarg("",oid),batarg("val",str),batarg("s",oid),arg("pat",str),arg("flags",str),arg("anti",bit))),
- command("regexp", "rematchjoin", regexpmatchfjoin, false, "Return the matching pairs from the 'val' and 'pat'\ncolumns", args(2,9, batarg("lr",oid),batarg("rr",oid),batarg("val",str),batarg("pat",str),arg("flags",str),batarg("sl",oid),batarg("sr",oid),arg("nil_matches",bit),arg("estimate",lng))),
- command("batregexp", "rematch", regexpmatchbulk, false, "Return a BAT with true for match and false for no match", args(1,3, batarg("",bit),batarg("val",str),arg("pat",str))),
- command("batregexp", "rematch", regexpmatchfbulk, false, "Return a BAT with true for match and false for no match", args(1,4, batarg("",bit),batarg("val",str),arg("pat",str),arg("flags",str))),
- { .imp=NULL }
+	command("regexp", "rematch", regexpmatch, false,
+		"Return true when the value 'val' matches the regular expression 'pat'",
+		args(1,3, arg("",bit),arg("val",str),arg("pat",str))),
+	command("regexp", "rematchselect", regexpmatchselect, false,
+		"Return the list of matches in 'val' that match the regular expression 'pat'",
+		args(1,5, batarg("",oid),batarg("val",str),batarg("cand",oid),arg("pat",str),arg("anti",bit))),
+	command("regexp", "rematchjoin", regexpmatchjoin, false,
+		"Return the matching pairs from the 'val' and 'pat' columns",
+		args(2,8, batarg("lr",oid),batarg("rr",oid),batarg("val",str),batarg("pat",str),batarg("sl",oid),batarg("sr",oid),arg("nil_matches",bit),arg("estimate",lng))),
+	command("regexp", "rematch", regexpmatchf, false,
+		"Return true when the value 'val' matches the regular expression 'pat'",
+		args(1,4, arg("",bit),arg("val",str),arg("pat",str),arg("flags",str))),
+	command("regexp", "rematchselect", regexpmatchfselect, false,
+		"Return the list of matches in 'val' that match the regular expression 'pat'",
+		args(1,6, batarg("",oid),batarg("val",str),batarg("s",oid),arg("pat",str),arg("flags",str),arg("anti",bit))),
+	command("regexp", "rematchjoin", regexpmatchfjoin, false,
+		"Return the matching pairs from the 'val' and 'pat'\ncolumns",
+		args(2,9, batarg("lr",oid),batarg("rr",oid),batarg("val",str),batarg("pat",str),arg("flags",str),batarg("sl",oid),batarg("sr",oid),arg("nil_matches",bit),arg("estimate",lng))),
+	command("batregexp", "rematch", regexpmatchbulk, false,
+		"Return a BAT with true for match and false for no match",
+		args(1,3, batarg("",bit),batarg("val",str),arg("pat",str))),
+	command("batregexp", "rematch", regexpmatchfbulk, false,
+		"Return a BAT with true for match and false for no match",
+		args(1,4, batarg("",bit),batarg("val",str),arg("pat",str),arg("flags",str))),
+	{ .imp=NULL }		/* sentinel */
 };
 
 #include "mal_import.h"
@@ -702,7 +718,7 @@
 #pragma section(".CRT$XCU",read)
 #endif
 LIB_STARTUP_FUNC(init_regexp)
-{ 
-	mal_module("regexp", NULL, regexp_init_funcs); 
-  	sql_register("regexp", regexp_sql); 
+{
+	mal_module("regexp", NULL, regexp_init_funcs);
+	sql_register("regexp", regexp_sql);
 }
--- a/reverse/MonetDB-reverse.spec	Tue Jun 08 11:39:36 2021 +0200
+++ b/reverse/MonetDB-reverse.spec	Tue Jun 08 11:58:34 2021 +0200
@@ -5,7 +5,7 @@
 # Copyright 2013-2018 MonetDB B.V.
 
 Name:		MonetDB-reverse
-Version:	1.1
+Version:	1.2
 Release:	1%{?dist}
 Summary:	reverse UDF for MonetDB
 
@@ -13,10 +13,12 @@
 URL:		http://www.monetdb.org/
 Source0:	%{name}-%{version}.tar.bz2
 
-BuildRequires:	MonetDB5-server-devel >= 11.25.1
+# 11.39.11, and even 11.39.17, not good enough since some include files
+# are missing
+BuildRequires:	MonetDB-SQL-server5-devel >= 11.39.11
 BuildRequires:	/usr/bin/rst2html
 BuildRequires:	/usr/bin/rst2pdf
-Requires:	MonetDB-SQL-server5%{?_isa} >= 11.25.1
+Requires:	MonetDB-SQL-server5%{?_isa} >= 11.39.11
 
 %description
 Simple example User-Defined Function (UDF) for MonetDB.
@@ -47,6 +49,9 @@
 %{_libdir}/monetdb5/*/*
 
 %changelog
+* Tue Jun  8 2021 Sjoerd Mullender <sjoerd@acm.org> - 1.2-1
+- Updated for the Oct2020 and later releases of MonetDB.
+
 * Thu Dec  7 2017 Sjoerd Mullender <sjoerd@acm.org> - 1.1-1
 - Updated for the Dec2016 and later releases of MonetDB.
 
--- a/reverse/reverse.c	Tue Jun 08 11:39:36 2021 +0200
+++ b/reverse/reverse.c	Tue Jun 08 11:58:34 2021 +0200
@@ -178,9 +178,13 @@
 static char reverse_sql[] = "CREATE FUNCTION reverse(src STRING) RETURNS STRING EXTERNAL NAME reverse.reverse;";
 
 static mel_func reverse_init_funcs[] = {
- command("reverse", "reverse", UDFreverse, false, "Reverse a string", args(1,2, arg("",str),arg("ra1",str))),
- command("batreverse", "reverse", UDFBATreverse, false, "Reverse a BAT of strings", args(1,2, batarg("",str),batarg("b",str))),
- { .imp=NULL }
+	command("reverse", "reverse", UDFreverse, false,
+		"Reverse a string",
+		args(1,2, arg("",str),arg("ra1",str))),
+	command("batreverse", "reverse", UDFBATreverse, false,
+		"Reverse a BAT of strings",
+		args(1,2, batarg("",str),batarg("b",str))),
+	{ .imp=NULL }		/* sentinel */
 };
 
 #include "mal_import.h"
@@ -190,7 +194,7 @@
 #pragma section(".CRT$XCU",read)
 #endif
 LIB_STARTUP_FUNC(init_reverse)
-{ 
-	mal_module("reverse", NULL, reverse_init_funcs); 
-  	sql_register("reverse", reverse_sql); 
+{
+	mal_module("reverse", NULL, reverse_init_funcs);
+	sql_register("reverse", reverse_sql);
 }