Changeset: a97b999d2e07 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a97b999d2e07
Removed Files:
        sql/backends/monet5/UDF/udf/80_udf.sql
        sql/backends/monet5/UDF/udf/80_udf_hge.sql
        sql/backends/monet5/UDF/udf/CMakeLists.txt
        sql/backends/monet5/UDF/udf/README
        sql/backends/monet5/UDF/udf/Tests/All
        sql/backends/monet5/UDF/udf/Tests/SingleServer
        sql/backends/monet5/UDF/udf/Tests/alastair_udf_mergetable_bug.py
        sql/backends/monet5/UDF/udf/Tests/sqlancer.test
        sql/backends/monet5/UDF/udf/Tests/string-length.Bug-3999.test
        sql/backends/monet5/UDF/udf/Tests/udf-fuse.test
        sql/backends/monet5/UDF/udf/Tests/udf-reverse.test
        sql/backends/monet5/UDF/udf/udf.c
        sql/backends/monet5/UDF/udf/udf_impl.h
Modified Files:
        ChangeLog
        MonetDB.spec
        NT/mksqlwxs.py
        cmake/monetdb-options.cmake
        debian/rules
        sql/backends/monet5/CMakeLists.txt
Branch: default
Log Message:

Removed the UDF module.


diffs (truncated from 1233 to 300 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
+* Mon Sep 28 2026 Sjoerd Mullender <[email protected]>
+- The example udf extension module has been removed.  For example
+  extensions, see https://www.monetdb.org/hg/MonetDB-extend/.  Note that
+  the udf module was not loaded automatically on startup of the server.
+
 * Thu Sep 17 2026 Sjoerd Mullender <[email protected]>
 - It is now possible to use --set usr1_outputfile=... to specify a file
   where the output for the SIGUSR1 signal is to be written.  The file
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -938,7 +938,6 @@ install -d -m 0775 "${RPM_BUILD_ROOT}"%{
 
 # remove unwanted stuff
 rm -f "${RPM_BUILD_ROOT}"%{_libdir}/monetdb5*/lib_microbenchmark*.so
-rm -f "${RPM_BUILD_ROOT}"%{_libdir}/monetdb5*/lib_udf*.so
 rm -f "${RPM_BUILD_ROOT}"%{_bindir}/monetdb_mtest.sh
 
 %if %{without compat} && %{with selinux}
diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py
--- a/NT/mksqlwxs.py
+++ b/NT/mksqlwxs.py
@@ -199,9 +199,9 @@ def main():
     print(r'            <Directory Id="lib" Name="lib">')
     print(r'              <Directory Id="monetdb5" Name="monetdb5">')
     id = comp(features, id, 16,
-              [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and x.endswith('.dll') and ('geom' not in x) and 
('microbenchmark' not in x) and ('udf' not in x), 
os.listdir(os.path.join(sys.argv[3], 'lib', f'monetdb5-{version}'))))])
+              [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and x.endswith('.dll') and ('geom' not in x) and 
('microbenchmark' not in x), os.listdir(os.path.join(sys.argv[3], 'lib', 
f'monetdb5-{version}'))))])
     id = comp(debug, id, 16,
-              [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and x.endswith('.pdb') and ('geom' not in x) and 
('microbenchmark' not in x) and ('udf' not in x), 
os.listdir(os.path.join(sys.argv[3], 'lib', f'monetdb5-{version}'))))])
+              [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and x.endswith('.pdb') and ('geom' not in x) and 
('microbenchmark' not in x), os.listdir(os.path.join(sys.argv[3], 'lib', 
f'monetdb5-{version}'))))])
     id = comp(geom, id, 16,
               [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and (x.endswith('.dll') or x.endswith('.pdb')) and ('geom' in 
x), os.listdir(os.path.join(sys.argv[3], 'lib', f'monetdb5-{version}'))))])
     print(r'              </Directory>')
diff --git a/cmake/monetdb-options.cmake b/cmake/monetdb-options.cmake
--- a/cmake/monetdb-options.cmake
+++ b/cmake/monetdb-options.cmake
@@ -161,12 +161,8 @@ option(MONETDB_STATIC
   "Enable static compilation mode"
   OFF)
 
-option(WITH_UDF
-  "Include UDF support"
-  ON)
-
 option(WITH_VAULTS
-  "Include UDF support"
+  "Include vault support"
   ON)
 
 option(WITH_MEROVINGIAN
diff --git a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
@@ -57,7 +57,6 @@ override_dh_auto_install:
        dh_auto_install
        rm debian/tmp/usr/bin/monetdb_mtest.sh
        rm debian/tmp/usr/lib/*/monetdb5*/lib_microbenchmark*.so
-       rm debian/tmp/usr/lib/*/monetdb5*/lib_udf*.so
 
 override_dh_installsystemd:
        dh_installsystemd --no-enable --no-start
diff --git a/sql/backends/monet5/CMakeLists.txt 
b/sql/backends/monet5/CMakeLists.txt
--- a/sql/backends/monet5/CMakeLists.txt
+++ b/sql/backends/monet5/CMakeLists.txt
@@ -234,9 +234,6 @@ install(TARGETS
   DESTINATION ${CMAKE_INSTALL_LIBDIR})
 
 add_subdirectory(generator)
-if(WITH_UDF)
-  add_subdirectory(UDF)
-endif()
 if(WITH_VAULTS)
   add_subdirectory(vaults)
 endif()
diff --git a/sql/backends/monet5/UDF/udf/80_udf.sql 
b/sql/backends/monet5/UDF/udf/80_udf.sql
deleted file mode 100644
--- a/sql/backends/monet5/UDF/udf/80_udf.sql
+++ /dev/null
@@ -1,27 +0,0 @@
--- SPDX-License-Identifier: MPL-2.0
---
--- This Source Code Form is subject to the terms of the Mozilla Public
--- License, v. 2.0.  If a copy of the MPL was not distributed with this
--- file, You can obtain one at https://mozilla.org/MPL/2.0/.
---
--- For copyright information, see the file debian/copyright.
-
--- add function signatures to SQL catalog
-
-
--- Reverse a string
-create function reverse(src string)
-returns string external name udf.reverse;
-
-
--- fuse two (1-byte) tinyint values into one (2-byte) smallint value
-create function fuse(one tinyint, two tinyint)
-returns smallint external name udf.fuse;
-
--- fuse two (2-byte) smallint values into one (4-byte) integer value
-create function fuse(one smallint, two smallint)
-returns integer external name udf.fuse;
-
--- fuse two (4-byte) integer values into one (8-byte) bigint value
-create function fuse(one integer, two integer)
-returns bigint external name udf.fuse;
diff --git a/sql/backends/monet5/UDF/udf/80_udf_hge.sql 
b/sql/backends/monet5/UDF/udf/80_udf_hge.sql
deleted file mode 100644
--- a/sql/backends/monet5/UDF/udf/80_udf_hge.sql
+++ /dev/null
@@ -1,14 +0,0 @@
--- SPDX-License-Identifier: MPL-2.0
---
--- This Source Code Form is subject to the terms of the Mozilla Public
--- License, v. 2.0.  If a copy of the MPL was not distributed with this
--- file, You can obtain one at https://mozilla.org/MPL/2.0/.
---
--- For copyright information, see the file debian/copyright.
-
--- add function signatures to SQL catalog
-
-
--- fuse two (8-byte) integer values into one (16-byte) bigint value
-create function fuse(one bigint, two bigint)
-returns hugeint external name udf.fuse;
diff --git a/sql/backends/monet5/UDF/udf/CMakeLists.txt 
b/sql/backends/monet5/UDF/udf/CMakeLists.txt
deleted file mode 100644
--- a/sql/backends/monet5/UDF/udf/CMakeLists.txt
+++ /dev/null
@@ -1,77 +0,0 @@
-#[[
-# SPDX-License-Identifier: MPL-2.0
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0.  If a copy of the MPL was not distributed with this
-# file, You can obtain one at https://mozilla.org/MPL/2.0/.
-#
-# For copyright information, see the file debian/copyright.
-#]]
-
-add_library(udf MODULE)
-
-set(include_sql_files
-  80_udf)
-
-if(HAVE_HGE)
-  list(APPEND include_sql_files
-    80_udf_hge)
-endif()
-
-create_include_object(
-  SQL_LANGUAGE
-  name_module "udf"
-  modules_list ${include_sql_files})
-
-target_sources(udf
-  PRIVATE
-  udf.c
-  udf_impl.h
-  ${MONETDB_CURRENT_SQL_SOURCES})
-
-target_include_directories(udf
-  PRIVATE
-  $<TARGET_PROPERTY:mal,INTERFACE_INCLUDE_DIRECTORIES>
-  $<TARGET_PROPERTY:malmodules,INTERFACE_INCLUDE_DIRECTORIES>
-  $<TARGET_PROPERTY:atoms,INTERFACE_INCLUDE_DIRECTORIES>
-  $<TARGET_PROPERTY:sql,INTERFACE_INCLUDE_DIRECTORIES>
-  $<TARGET_PROPERTY:sqlinclude,INTERFACE_INCLUDE_DIRECTORIES>
-  $<TARGET_PROPERTY:sqlserver,INTERFACE_INCLUDE_DIRECTORIES>
-  $<TARGET_PROPERTY:sqlcommon,INTERFACE_INCLUDE_DIRECTORIES>
-  $<TARGET_PROPERTY:sqlstorage,INTERFACE_INCLUDE_DIRECTORIES>
-  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
-  $<INSTALL_INTERFACE:${INCLUDEDIR}/monetdb>)
-
-target_link_libraries(udf
-  PRIVATE
-  bat
-  monetdb5
-  sql
-  monetdb_config_header)
-
-target_compile_definitions(udf
-  PRIVATE
-  LIBUDF)
-
-set_target_properties(udf
-  PROPERTIES
-  OUTPUT_NAME
-  _udf)
-
-install(TARGETS
-  udf
-  LIBRARY
-  DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5-${MONETDB_VERSION}
-  COMPONENT server
-  ARCHIVE
-  DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5-${MONETDB_VERSION}
-  PUBLIC_HEADER
-  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monetdb
-  INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-
-if(WIN32)
-  install(FILES
-    $<TARGET_PDB_FILE:udf>
-    DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5-${MONETDB_VERSION}
-    OPTIONAL)
-endif()
diff --git a/sql/backends/monet5/UDF/udf/README 
b/sql/backends/monet5/UDF/udf/README
deleted file mode 100644
--- a/sql/backends/monet5/UDF/udf/README
+++ /dev/null
@@ -1,7 +0,0 @@
-This directory is a template for extending SQL with a new user-defined
-function (UDF).  For further documentation, see the MonetDB website at
-https://www.monetdb.org/documentation/user-guide/sql-manual/data-types/udf-types
-as well as the Mercurial repository at
-https://dev.monetdb.org/hg/MonetDB-extend
-and especially the file reverse/README.rst in there, which contains a
-lot of hands-on information for creating a UDF.
diff --git a/sql/backends/monet5/UDF/udf/Tests/All 
b/sql/backends/monet5/UDF/udf/Tests/All
deleted file mode 100644
--- a/sql/backends/monet5/UDF/udf/Tests/All
+++ /dev/null
@@ -1,5 +0,0 @@
-udf-reverse
-udf-fuse
-string-length.Bug-3999
-sqlancer
-alastair_udf_mergetable_bug
diff --git a/sql/backends/monet5/UDF/udf/Tests/SingleServer 
b/sql/backends/monet5/UDF/udf/Tests/SingleServer
deleted file mode 100644
--- a/sql/backends/monet5/UDF/udf/Tests/SingleServer
+++ /dev/null
@@ -1,1 +0,0 @@
---loadmodule udf
diff --git a/sql/backends/monet5/UDF/udf/Tests/alastair_udf_mergetable_bug.py 
b/sql/backends/monet5/UDF/udf/Tests/alastair_udf_mergetable_bug.py
deleted file mode 100644
--- a/sql/backends/monet5/UDF/udf/Tests/alastair_udf_mergetable_bug.py
+++ /dev/null
@@ -1,29 +0,0 @@
-import os, tempfile
-
-from MonetDBtesting.sqltest import SQLTestCase
-try:
-    from MonetDBtesting import process
-except ImportError:
-    import process
-
-with tempfile.TemporaryDirectory() as farm_dir:
-    os.mkdir(os.path.join(farm_dir, 'db1'))
-    with process.server(mapiport='0', dbname='db1',
-                        dbfarm=os.path.join(farm_dir, 'db1'),
-                        args=["--set", "gdk_nr_threads=2", "--forcemito",
-                              "--loadmodule", "udf"],
-                        stdin=process.PIPE,
-                        stdout=process.PIPE,
-                        stderr=process.PIPE) as s:
-        with SQLTestCase(server=s) as tc:
-            tc.execute("create table tab1 (group_by_col int, index_col int, f 
float);").assertSucceeded()
-            tc.execute("create table tab2 (index_col int, f 
float);").assertSucceeded()
-            tc.execute("insert into tab1 values 
(1,1,1),(1,2,2),(2,1,3),(2,2,4),(3,1,5),(3,2,6);").assertSucceeded().assertRowCount(6)
-            tc.execute("insert into tab2 values 
(1,111),(2,222),(3,333),(4,444);").assertSucceeded().assertRowCount(4)
-            tc.execute("set optimizer='default_pipe';").assertSucceeded()
-            tc.execute("select 
optimizer;").assertSucceeded().assertRowCount(1).assertDataResultMatch([("default_pipe",)])
-            tc.execute("select tab1.group_by_col,SUM(fuse(cast (tab1.f as 
INT),cast (tab2.f as INT))) from tab2 inner join tab1 on tab1.index_col = 
tab2.index_col group by tab1.group_by_col;") \
-                
.assertSucceeded().assertRowCount(3).assertDataResultMatch([(1, 
12884902221),(2, 30064771405),(3, 47244640589)], rowsort=True)
-            tc.execute("drop table tab1;").assertSucceeded()
-            tc.execute("drop table tab2;").assertSucceeded()
-        s.communicate()
diff --git a/sql/backends/monet5/UDF/udf/Tests/sqlancer.test 
b/sql/backends/monet5/UDF/udf/Tests/sqlancer.test
deleted file mode 100644
--- a/sql/backends/monet5/UDF/udf/Tests/sqlancer.test
+++ /dev/null
@@ -1,54 +0,0 @@
-query T rowsort
-select reverse(E'8 \\rcr੧[bp1eMY쫺4j5s뮯!<Rn4*}')
-----
-}*4nR<!뮯s5j4쫺YMe1pb[੧rcr\ 8
-
-statement ok
-CREATE TABLE integers(i INTEGER)
-
-statement ok
-insert into integers(i) values(((length(reverse(E'8 
\rcr੧[bp1eMY쫺4j5s뮯!<Rn4*}')))>>(((- (- (528640982)))&(ascii('528640982'))))))
-
-query I nosort
-SELECT i from integers order by i
-----
-0
-
-statement ok
-START TRANSACTION
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to