changeset 294:894abb249de1

Corrected 3 MonetDatabaseMetaData methods
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Wed, 31 Jul 2019 20:07:55 +0200 (2019-07-31)
parents 60bfe2d0ba2a
children 003ae6d881db
files ChangeLog src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
diffstat 2 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,10 +2,14 @@
 # This file is updated with Maddlog
 
 * Wed Jul 31 2019 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
+- Corrected MonetDatabaseMetaData methods:
+  - getNumericFunctions(): it now includes function: pi.
+  - getSystemFunctions(): it no longer lists numeric functions: pi and rand.
+  - supportsSchemasInIndexDefinitions(): changed from true to false
 - Optimised MonetStatement memory resource usage by only creating an ArrayList
   and ReentrantLock object when the batch methods addBatch() or executeBatch()
-  are called. In most Statement usages those methods are not called.
-- Implemented method MonetClob.getAsciiStream()
+  are called. In most Statement usages those methods are never called.
+- Implemented method MonetClob.getAsciiStream().
 
 * Thu Mar 21 2019 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
 - Added implementation of java.sql.CallableStatement interface. Some standard
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
@@ -494,7 +494,7 @@ public class MonetDatabaseMetaData exten
 			" AND \"type\" = 1" +	// only scalar functions
 			// exclude functions which belong to the 'str' module
 			" AND \"mod\" <> 'str')" +	// to filter out string functions: 'code' and 'space'
-			" OR \"name\" IN ('degrees','fuse','ms_round','ms_str','ms_trunc','radians')";
+			" OR \"name\" IN ('degrees','fuse','pi','ms_round','ms_str','ms_trunc','radians')";
 		return getConcatenatedStringFromQuery(FunctionsSelect + FunctionsWhere + match + OrFunctionsMaxMin + FunctionsOrderBy1);
 	}
 
@@ -520,7 +520,7 @@ public class MonetDatabaseMetaData exten
 			" AND \"type\" = 1" +	// only scalar functions
 			// exclude functions which belong to the 'mtime' module
 			" AND \"mod\" <> 'mtime'" +
-			" AND \"name\" NOT IN ('localtime','localtimestamp')" +
+			" AND \"name\" NOT IN ('localtime','localtimestamp','pi','rand')" +
 			// add system functions which are not listed in sys.functions but implemented in the SQL parser (see sql/server/sql_parser.y)
 			" UNION SELECT 'cast'" +
 			" UNION SELECT 'coalesce'" +
@@ -1114,7 +1114,9 @@ public class MonetDatabaseMetaData exten
 	 */
 	@Override
 	public boolean supportsSchemasInIndexDefinitions() {
-		return true;
+		// we currently do NOT support: create index sch.tblidx on sch.tbl(col);
+		// only: create index tblidx on sch.tbl(col);
+		return false;
 	}
 
 	/**