changeset 338:98018e38994b

Correct getNumericFunctions() which incorrectly returned functions 'code' and 'space' as numeric functions.
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Wed, 25 Sep 2019 19:16:07 +0200 (2019-09-25)
parents 55735963f605
children 71a79126a390
files ChangeLog ChangeLog-Archive src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
diffstat 3 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -34,7 +34,7 @@
 
 * Wed Aug 14 2019 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
 - Improved MonetDatabaseMetaData methods:
-  - getNumericFunctions(): it now includes functions: code, space and sys.alpha
+  - getNumericFunctions(): it now includes function: sys.alpha
   - getNumericFunctions(): it no longer lists functions: not_uniques and rotate_xor_hash
   - getStringFunctions(): it now includes functions: json.isarray, json.isobject,
       json.isvalid, sys.reverse which accept a string value as argument
--- a/ChangeLog-Archive
+++ b/ChangeLog-Archive
@@ -35,7 +35,7 @@
 
 * Wed Aug 14 2019 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
 - Improved MonetDatabaseMetaData methods:
-  - getNumericFunctions(): it now includes functions: code, space and sys.alpha
+  - getNumericFunctions(): it now includes function: sys.alpha
   - getNumericFunctions(): it no longer lists functions: not_uniques and rotate_xor_hash
   - getStringFunctions(): it now includes functions: json.isarray, json.isobject,
       json.isvalid, sys.reverse which accept a string value as argument
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
@@ -405,9 +405,9 @@ public class MonetDatabaseMetaData
 	public String getNumericFunctions() {
 		final String match =
 			"('tinyint','smallint','int','bigint','hugeint','decimal','double','real'))" +
-			" AND \"type\" = 1" +	// only scalar functions, note that code(int) and space(int) will also be listed as string functions
-			// exclude functions which do not work
-			" AND f.\"name\" NOT IN ('not_uniques','rotate_xor_hash'))" +
+			" AND \"type\" = 1" +	// only scalar functions
+			// exclude functions which do not work or belong to string functions (code(int) and space(int))
+			" AND f.\"name\" NOT IN ('code','not_uniques','rotate_xor_hash','space'))" +
 			// include specific functions which have no 1st arg (pi()) or it is not numeric
 			" OR f.\"name\" IN ('alpha','degrees','fuse','ms_round','ms_str','ms_trunc','pi','radians')";
 		return getConcatenatedStringFromQuery(FunctionsSelect + FunctionsWhere + match + OrFunctionsMaxMin + FunctionsOrderBy1);