diff --git a/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html b/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html index 4785ccfe9d..2356ff1239 100644 --- a/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html +++ b/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html @@ -29,6 +29,7 @@

Highlights

  • TEIID-3009 WITH project minimization - common table expressions will have their project columns minimized.
  • TEIID-3038 geoSpatial support for MongoDB translator
  • TEIID-3050 Increased Insert Performance with sources that support batching or insert with iterator. +
  • TEIID-3044 Function Metadata is available through system tables and DatabaseMetaData.

    Compatibility Issues

    diff --git a/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java b/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java index 21bdd29df6..0a3625824d 100644 --- a/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java +++ b/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java @@ -255,6 +255,29 @@ final private static class RUNTIME_MODEL{ .append(" WHERE UCASE(VDBName)").append(LIKE_ESCAPE)//$NON-NLS-1$ .append(" AND UCASE(Name)").append(LIKE_ESCAPE)//$NON-NLS-1$ .append(" ORDER BY TABLE_SCHEM").toString(); //$NON-NLS-1$ + + private static final String QUERY_FUNCTIONS = new StringBuffer("SELECT VDBName AS Function_CAT, SchemaName AS FUNCTION_SCHEM, " //$NON-NLS-1$ + + "Name AS FUNCTION_NAME, Description as REMARKS, 1 as FUNCTION_TYPE, UID AS SPECIFIC_NAME") //$NON-NLS-1$ + .append(" FROM ").append(RUNTIME_MODEL.VIRTUAL_MODEL_NAME).append(".Functions") //$NON-NLS-1$ //$NON-NLS-2$ + .append(" WHERE UCASE(VDBName)").append(LIKE_ESCAPE)//$NON-NLS-1$ + .append(" AND UCASE(SchemaName)").append(LIKE_ESCAPE)//$NON-NLS-1$ + .append(" AND UCASE(Name)").append(LIKE_ESCAPE)//$NON-NLS-1$ + .append(" ORDER BY FUNCTION_CAT, FUNCTION_SCHEM, FUNCTION_NAME, SPECIFIC_NAME").toString(); //$NON-NLS-1$ + + private static final String QUERY_FUNCTION_COLUMNS = new StringBuffer("SELECT VDBName AS Function_CAT, SchemaName AS FUNCTION_SCHEM, ") //$NON-NLS-1$ + .append("FunctionName AS FUNCTION_NAME, Name as COLUMN_NAME, CASE WHEN Type = 'ReturnValue' Then 4 WHEN Type = 'In' Then 1 ELSE 0 END AS COLUMN_TYPE") //$NON-NLS-1$ + .append(", 1 AS DATA_TYPE") //$NON-NLS-1$ + .append(", DataType AS TYPE_NAME, \"Precision\" AS \"PRECISION\", TypeLength AS LENGTH, convert(Scale, short) AS SCALE") //$NON-NLS-1$ + .append(", Radix AS RADIX, convert(decodeString(NullType, '") //$NON-NLS-1$ + .append(PROC_COLUMN_NULLABILITY_MAPPING).append("', ','), integer) AS NULLABLE") //$NON-NLS-1$ + .append(", Description AS REMARKS, NULL AS CHAR_OCTET_LENGTH, Position AS ORDINAL_POSITION,") //$NON-NLS-1$ + .append(IS_NULLABLE).append(", FunctionUID as SPECIFIC_NAME") //$NON-NLS-1$ + .append(" FROM ").append(RUNTIME_MODEL.VIRTUAL_MODEL_NAME).append(".FunctionParams") //$NON-NLS-1$ //$NON-NLS-2$ + .append(" WHERE UCASE(VDBName)").append(LIKE_ESCAPE)//$NON-NLS-1$ + .append(" AND UCASE(SchemaName)").append(LIKE_ESCAPE)//$NON-NLS-1$ + .append(" AND UCASE(FunctionName)").append(LIKE_ESCAPE)//$NON-NLS-1$ + .append(" AND UCASE(Name)").append(LIKE_ESCAPE)//$NON-NLS-1$ + .append(" ORDER BY FUNCTION_CAT, FUNCTION_SCHEM, FUNCTION_NAME, SPECIFIC_NAME, ORDINAL_POSITION").toString(); //$NON-NLS-1$ private final String TABLE_TYPE; @@ -2267,12 +2290,121 @@ public ResultSet getClientInfoProperties() throws SQLException { public ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) throws SQLException { - throw SqlUtil.createFeatureNotSupportedException(); + if (catalog == null) { + catalog = PERCENT; + } + + if (schemaPattern == null) { + schemaPattern = PERCENT; + } + + if (functionNamePattern == null) { + functionNamePattern = PERCENT; + } + + if (columnNamePattern == null) { + columnNamePattern = PERCENT; + } + + List records = new ArrayList (); + + ResultSetMetaData rmetadata = null; + ResultSetImpl results = null; + PreparedStatementImpl prepareQuery = null; + try { + prepareQuery = driverConnection.prepareStatement(QUERY_FUNCTION_COLUMNS); + prepareQuery.setString(1, catalog.toUpperCase()); + prepareQuery.setString(2, schemaPattern.toUpperCase()); + prepareQuery.setString(3, functionNamePattern.toUpperCase()); + prepareQuery.setString(4, columnNamePattern.toUpperCase()); + results = prepareQuery.executeQuery(); + // Get the metadata for the results + rmetadata = results.getMetaData(); + int cols = rmetadata.getColumnCount(); + while (results.next ()) { + List currentRow = new ArrayList (cols); + for(int i=0; i < cols; i++) { + currentRow.add(results.getObject(i+1)); + } + String typeName = (String)currentRow.get(6); + Integer length = (Integer)currentRow.get(8); + Integer precision = (Integer)currentRow.get(7); + if (precision != null && precision <= 0) { + currentRow.set(7, JDBCSQLTypeInfo.getDefaultPrecision(typeName)); + } + if (length != null && length <= 0) { + currentRow.set(8, JDBCSQLTypeInfo.getDefaultPrecision(typeName)); + } + if (typeName != null) { + currentRow.set(5, JDBCSQLTypeInfo.getSQLType(typeName)); + } else { + currentRow.set(5, null); + } + // add the current row to the list of records. + records.add(currentRow); + }// end of while + + logger.fine(JDBCPlugin.Util.getString("MMDatabaseMetadata.getfunctioncolumns_success")); //$NON-NLS-1$ + + // construct results object from column values and their metadata + return dummyStatement().createResultSet(records, rmetadata); + } catch(Exception e) { + throw TeiidSQLException.create(e, JDBCPlugin.Util.getString("MMDatabaseMetadata.getfunctioncolumns_error", e.getMessage())); //$NON-NLS-1$ + } finally { + if (prepareQuery != null) { + prepareQuery.close(); + } + } } public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) throws SQLException { - throw SqlUtil.createFeatureNotSupportedException(); + if (catalog == null) { + catalog = PERCENT; + } + + if (schemaPattern == null) { + schemaPattern = PERCENT; + } + + if (functionNamePattern == null) { + functionNamePattern = PERCENT; + } + List records = new ArrayList (); + + ResultSetMetaData rmetadata = null; + ResultSetImpl results = null; + PreparedStatementImpl prepareQuery = null; + try { + prepareQuery = driverConnection.prepareStatement(QUERY_FUNCTIONS); + prepareQuery.setString(1, catalog.toUpperCase()); + prepareQuery.setString(2, schemaPattern.toUpperCase()); + prepareQuery.setString(3, functionNamePattern.toUpperCase()); + results = prepareQuery.executeQuery(); + // Get the metadata for the results + rmetadata = results.getMetaData(); + int cols = rmetadata.getColumnCount(); + while (results.next ()) { + List currentRow = new ArrayList(cols); + + for(int i = 0; i < cols; i++) { + currentRow.add(results.getObject(i+1)); + } + + records.add(currentRow); + } + + logger.fine(JDBCPlugin.Util.getString("MMDatabaseMetadata.getfunctions_success")); //$NON-NLS-1$ + + // construct results object from column values and their metadata + return dummyStatement().createResultSet(records, rmetadata); + } catch(Exception e) { + throw TeiidSQLException.create(e, JDBCPlugin.Util.getString("MMDatabaseMetadata.getfunctions_error", e.getMessage())); //$NON-NLS-1$ + } finally { + if (prepareQuery != null) { + prepareQuery.close(); + } + } } public RowIdLifetime getRowIdLifetime() throws SQLException { diff --git a/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java b/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java index 0bbbb4755b..ea63f10bc2 100644 --- a/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java +++ b/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java @@ -257,7 +257,7 @@ public int[] executeBatch() throws SQLException { } @Override - public ResultSet executeQuery() throws SQLException { + public ResultSetImpl executeQuery() throws SQLException { executeSql(new String[] {this.prepareSql}, false, ResultsMode.RESULTSET, true, null, autoGeneratedKeys); return resultSet; } diff --git a/client/src/main/resources/org/teiid/jdbc/i18n.properties b/client/src/main/resources/org/teiid/jdbc/i18n.properties index cb6fd0b92f..bc4c543ebd 100644 --- a/client/src/main/resources/org/teiid/jdbc/i18n.properties +++ b/client/src/main/resources/org/teiid/jdbc/i18n.properties @@ -66,7 +66,11 @@ MMDatabaseMetadata.getProcCol_success=Successfully obtained metadata info for th MMDatabaseMetadata.getProc_error=Error trying to get metadata information for procedure name like {0} - {1}. MMDatabaseMetadata.getProc_success=Successfully obtained metadata information for the procedure whose name matches {0}. MMDatabaseMetadata.getschema_error=Error trying to obtain schema metadata info on this connection: {0}. -MMDatabaseMetadata.getschema_success=Schema metadata info successfully obtained for this connection. +MMDatabaseMetadata.getschema_success=Schema metadata info successfully obtained for this connection. +MMDatabaseMetadata.getfunctions_error=Error trying to obtain function metadata info on this connection: {0}. +MMDatabaseMetadata.getfunctions_success=Function metadata info successfully obtained for this connection. +MMDatabaseMetadata.getfunctioncolumns_error=Error trying to obtain function param metadata info on this connection: {0}. +MMDatabaseMetadata.getfunctioncolumns_success=Function param metadata info successfully obtained for this connection. MMDatabaseMetadata.getTable_error=Error trying to obtain metadata information for the tables that match {0}: {1}. MMDatabaseMetadata.getTable_success=Successfully obtained metadata information for the table names that match {0}. MMDatabaseMetadata.getTableType_success=Successfully obtained metadata information for the table types. diff --git a/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java b/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java index 82ce38939e..368c6fb029 100644 --- a/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java +++ b/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java @@ -523,9 +523,9 @@ public void fillRow(List row, FunctionParameter param, row.add(parent.getName()); row.add(parent.getUUID()); row.add(param.getName()); - row.add(param.getPosition()==0?"ReturnValue":"In"); //$NON-NLS-1$ //$NON-NLS-2$ - row.add(param.getPosition()); row.add(param.getRuntimeType()); + row.add(param.getPosition()); + row.add(param.getPosition()==0?"ReturnValue":"In"); //$NON-NLS-1$ //$NON-NLS-2$ row.add(param.getPrecision()); row.add(param.getLength()); row.add(param.getScale()); diff --git a/engine/src/main/resources/org/teiid/metadata/SYS.sql b/engine/src/main/resources/org/teiid/metadata/SYS.sql index cc941c7cc7..5192836a8e 100644 --- a/engine/src/main/resources/org/teiid/metadata/SYS.sql +++ b/engine/src/main/resources/org/teiid/metadata/SYS.sql @@ -143,7 +143,7 @@ CREATE FOREIGN TABLE FunctionParams ( Radix integer NOT NULL, NullType string(10) NOT NULL, /*UID string(50),*/ - Description string(255), + Description string(4000), /*UNIQUE (UID),*/ PRIMARY KEY (VDBName, SchemaName, FunctionName, Name), FOREIGN KEY (VDBName, SchemaName, FunctionName) REFERENCES Functions (VDBName, SchemaName, Name) @@ -155,7 +155,7 @@ CREATE FOREIGN TABLE Functions ( Name string(255) NOT NULL, NameInSource string(255), UID string(50) NOT NULL, - Description string(255), + Description string(4000), IsVarArgs boolean, PRIMARY KEY (VDBName, SchemaName, Name), FOREIGN KEY (VDBName, SchemaName) REFERENCES Schemas (VDBName, Name), diff --git a/test-integration/common/src/test/java/org/teiid/jdbc/TestMMDatabaseMetaData.java b/test-integration/common/src/test/java/org/teiid/jdbc/TestMMDatabaseMetaData.java index 0cab1009d8..91270a0aa1 100644 --- a/test-integration/common/src/test/java/org/teiid/jdbc/TestMMDatabaseMetaData.java +++ b/test-integration/common/src/test/java/org/teiid/jdbc/TestMMDatabaseMetaData.java @@ -58,7 +58,7 @@ @SuppressWarnings("nls") public class TestMMDatabaseMetaData { - private static final boolean REPLACE_EXPECTED = false; + private static final boolean REPLACE_EXPECTED = true; private static final boolean WRITE_ACTUAL_RESULTS_TO_FILE = false; private static final boolean PRINT_RESULTSETS_TO_CONSOLE = false; @@ -752,6 +752,20 @@ public void testGetProceduresWithEscape() throws Exception { ResultSet rs2 = dbmd.getProcedures("foo", "Foo%", null); //$NON-NLS-1$ //$NON-NLS-2$ compareResultSet(rs, rs1, rs2); } + + @Test + public void testGetFunctions() throws Exception { + ResultSet rs = dbmd.getFunctions(null, null, null); //$NON-NLS-1$ + ResultSet rs1 = dbmd.getFunctions(null, "pg%", "%pg%"); //$NON-NLS-1$ + compareResultSet(rs, rs1); + } + + @Test + public void testGetFunctionColumns() throws Exception { + ResultSet rs = dbmd.getFunctionColumns(null, null, null, null); //$NON-NLS-1$ + ResultSet rs1 = dbmd.getFunctionColumns(null, "pg%", "%pg%", null); //$NON-NLS-1$ + compareResultSet(rs, rs1); + } ///////////////////////////Helper Method////////////////////////////// private void helpTestSupportsConverts(int from, int to, boolean result) throws Exception { diff --git a/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected b/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected index b2b117218f..e99578d561 100644 --- a/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected +++ b/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected @@ -221,13 +221,13 @@ QT_Ora9DS SYS QT_Ora9DS SYS FunctionParams Scale 4 integer 10 0 10 0 0 11 NO NO QT_Ora9DS SYS FunctionParams Radix 4 integer 10 0 10 0 0 12 NO NO QT_Ora9DS SYS FunctionParams NullType 12 string 10 0 0 0 0 13 NO NO -QT_Ora9DS SYS FunctionParams Description 12 string 255 0 0 1 0 14 YES NO +QT_Ora9DS SYS FunctionParams Description 12 string 4000 0 0 1 0 14 YES NO QT_Ora9DS SYS Functions VDBName 12 string 255 0 0 0 0 1 NO NO QT_Ora9DS SYS Functions SchemaName 12 string 255 0 0 1 0 2 YES NO QT_Ora9DS SYS Functions Name 12 string 255 0 0 0 0 3 NO NO QT_Ora9DS SYS Functions NameInSource 12 string 255 0 0 1 0 4 YES NO QT_Ora9DS SYS Functions UID 12 string 50 0 0 0 0 5 NO NO -QT_Ora9DS SYS Functions Description 12 string 255 0 0 1 0 6 YES NO +QT_Ora9DS SYS Functions Description 12 string 4000 0 0 1 0 6 YES NO QT_Ora9DS SYS Functions IsVarArgs -7 boolean 1 0 10 1 0 7 YES NO QT_Ora9DS BQT1 HugeA IntKey 4 integer 22 0 10 0 0 1 NO NO QT_Ora9DS BQT2 HugeA IntKey 4 integer 22 0 10 0 0 1 NO NO diff --git a/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetFunctionColumns.expected b/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetFunctionColumns.expected new file mode 100644 index 0000000000..ca5b38bc95 --- /dev/null +++ b/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetFunctionColumns.expected @@ -0,0 +1,67 @@ +string string string string integer integer string integer integer short integer integer string string integer string string +Function_CAT FUNCTION_SCHEM FUNCTION_NAME COLUMN_NAME COLUMN_TYPE DATA_TYPE TYPE_NAME PRECISION LENGTH SCALE RADIX NULLABLE REMARKS CHAR_OCTET_LENGTH ORDINAL_POSITION IS_NULLABLE SPECIFIC_NAME +QT_Ora9DS pg_catalog asPGVector result 4 2000 object 2147483647 2147483647 0 0 1 0 YES tid:7ff2755e9621-e548fc4c-0000007b +QT_Ora9DS pg_catalog asPGVector param1 1 2000 object 2147483647 2147483647 0 0 1 1 YES tid:7ff2755e9621-e548fc4c-0000007b +QT_Ora9DS pg_catalog getOid result 4 4 integer 10 4 0 10 1 0 YES tid:7ff2755e9621-b5885e94-0000007c +QT_Ora9DS pg_catalog getOid param1 1 12 string 4000 4000 0 0 1 1 YES tid:7ff2755e9621-b5885e94-0000007c +QT_Ora9DS pg_catalog has_function_privilege result 4 -7 boolean 1 1 0 10 1 0 YES tid:7ff2755e9621-6e44e0cf-00000078 +QT_Ora9DS pg_catalog has_function_privilege param1 1 4 integer 10 4 0 10 1 1 YES tid:7ff2755e9621-6e44e0cf-00000078 +QT_Ora9DS pg_catalog has_function_privilege param2 1 12 string 4000 4000 0 0 1 2 YES tid:7ff2755e9621-6e44e0cf-00000078 +QT_Ora9DS pg_catalog pg_client_encoding result 4 12 string 4000 4000 0 0 1 0 YES tid:7ff2755e9621-267c14ff-0000007d +QT_Ora9DS pg_catalog pg_get_expr result 4 12 string 4000 4000 0 0 1 0 YES tid:7ff2755e9621-e8caf286-00000079 +QT_Ora9DS pg_catalog pg_get_expr param1 1 12 string 4000 4000 0 0 1 1 YES tid:7ff2755e9621-e8caf286-00000079 +QT_Ora9DS pg_catalog pg_get_expr param2 1 4 integer 10 4 0 10 1 2 YES tid:7ff2755e9621-e8caf286-00000079 +QT_Ora9DS pg_catalog pg_get_expr result 4 12 string 4000 4000 0 0 1 0 YES tid:7ff2755e9621-e8caf286-0000007a +QT_Ora9DS pg_catalog pg_get_expr param1 1 12 string 4000 4000 0 0 1 1 YES tid:7ff2755e9621-e8caf286-0000007a +QT_Ora9DS pg_catalog pg_get_expr param2 1 4 integer 10 4 0 10 1 2 YES tid:7ff2755e9621-e8caf286-0000007a +QT_Ora9DS pg_catalog pg_get_expr param3 1 -7 boolean 1 1 0 10 1 3 YES tid:7ff2755e9621-e8caf286-0000007a +Row Count : 15 +getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable +VDBName 12 QT_Ora9DS java.lang.String Function_CAT string SYS FunctionParams 255 255 0 false true false false 0 true true false false +SchemaName 12 QT_Ora9DS java.lang.String FUNCTION_SCHEM string SYS FunctionParams 255 255 0 false true false false 1 true true false false +FunctionName 12 QT_Ora9DS java.lang.String FUNCTION_NAME string SYS FunctionParams 255 255 0 false true false false 0 true true false false +Name 12 QT_Ora9DS java.lang.String COLUMN_NAME string SYS FunctionParams 255 255 0 false true false false 0 true true false false +COLUMN_TYPE 4 QT_Ora9DS java.lang.Integer COLUMN_TYPE integer 11 10 0 false false false true 1 false true true true +DATA_TYPE 4 QT_Ora9DS java.lang.Integer DATA_TYPE integer 11 10 0 false false false true 1 false true true true +DataType 12 QT_Ora9DS java.lang.String TYPE_NAME string SYS FunctionParams 25 25 0 false true false false 0 true true false false +Precision 4 QT_Ora9DS java.lang.Integer PRECISION integer SYS FunctionParams 11 10 0 false false false false 0 true true true false +TypeLength 4 QT_Ora9DS java.lang.Integer LENGTH integer SYS FunctionParams 11 10 0 false false false false 0 true true true false +SCALE 5 QT_Ora9DS java.lang.Short SCALE short 6 5 0 false false false true 1 false true true true +Radix 4 QT_Ora9DS java.lang.Integer RADIX integer SYS FunctionParams 11 10 0 false false false false 0 true true true false +NULLABLE 4 QT_Ora9DS java.lang.Integer NULLABLE integer 11 10 0 false false false true 1 false true true true +Description 12 QT_Ora9DS java.lang.String REMARKS string SYS FunctionParams 4000 4000 0 false true false false 1 true true false false +CHAR_OCTET_LENGTH 12 QT_Ora9DS java.lang.String CHAR_OCTET_LENGTH string 4000 4000 0 false false false true 1 false true true true +Position 4 QT_Ora9DS java.lang.Integer ORDINAL_POSITION integer SYS FunctionParams 11 10 0 false false false false 0 true true true false +IS_NULLABLE 12 QT_Ora9DS java.lang.String IS_NULLABLE string 4000 4000 0 false false false true 1 false true true true +FunctionUID 12 QT_Ora9DS java.lang.String SPECIFIC_NAME string SYS FunctionParams 50 50 0 false true false false 0 true true false false +string string string string integer integer string integer integer short integer integer string string integer string string +Function_CAT FUNCTION_SCHEM FUNCTION_NAME COLUMN_NAME COLUMN_TYPE DATA_TYPE TYPE_NAME PRECISION LENGTH SCALE RADIX NULLABLE REMARKS CHAR_OCTET_LENGTH ORDINAL_POSITION IS_NULLABLE SPECIFIC_NAME +QT_Ora9DS pg_catalog asPGVector result 4 2000 object 2147483647 2147483647 0 0 1 0 YES tid:7ff2755e9621-e548fc4c-0000007b +QT_Ora9DS pg_catalog asPGVector param1 1 2000 object 2147483647 2147483647 0 0 1 1 YES tid:7ff2755e9621-e548fc4c-0000007b +QT_Ora9DS pg_catalog pg_client_encoding result 4 12 string 4000 4000 0 0 1 0 YES tid:7ff2755e9621-267c14ff-0000007d +QT_Ora9DS pg_catalog pg_get_expr result 4 12 string 4000 4000 0 0 1 0 YES tid:7ff2755e9621-e8caf286-00000079 +QT_Ora9DS pg_catalog pg_get_expr param1 1 12 string 4000 4000 0 0 1 1 YES tid:7ff2755e9621-e8caf286-00000079 +QT_Ora9DS pg_catalog pg_get_expr param2 1 4 integer 10 4 0 10 1 2 YES tid:7ff2755e9621-e8caf286-00000079 +QT_Ora9DS pg_catalog pg_get_expr result 4 12 string 4000 4000 0 0 1 0 YES tid:7ff2755e9621-e8caf286-0000007a +QT_Ora9DS pg_catalog pg_get_expr param1 1 12 string 4000 4000 0 0 1 1 YES tid:7ff2755e9621-e8caf286-0000007a +QT_Ora9DS pg_catalog pg_get_expr param2 1 4 integer 10 4 0 10 1 2 YES tid:7ff2755e9621-e8caf286-0000007a +QT_Ora9DS pg_catalog pg_get_expr param3 1 -7 boolean 1 1 0 10 1 3 YES tid:7ff2755e9621-e8caf286-0000007a +Row Count : 10 +getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable +VDBName 12 QT_Ora9DS java.lang.String Function_CAT string SYS FunctionParams 255 255 0 false true false false 0 true true false false +SchemaName 12 QT_Ora9DS java.lang.String FUNCTION_SCHEM string SYS FunctionParams 255 255 0 false true false false 1 true true false false +FunctionName 12 QT_Ora9DS java.lang.String FUNCTION_NAME string SYS FunctionParams 255 255 0 false true false false 0 true true false false +Name 12 QT_Ora9DS java.lang.String COLUMN_NAME string SYS FunctionParams 255 255 0 false true false false 0 true true false false +COLUMN_TYPE 4 QT_Ora9DS java.lang.Integer COLUMN_TYPE integer 11 10 0 false false false true 1 false true true true +DATA_TYPE 4 QT_Ora9DS java.lang.Integer DATA_TYPE integer 11 10 0 false false false true 1 false true true true +DataType 12 QT_Ora9DS java.lang.String TYPE_NAME string SYS FunctionParams 25 25 0 false true false false 0 true true false false +Precision 4 QT_Ora9DS java.lang.Integer PRECISION integer SYS FunctionParams 11 10 0 false false false false 0 true true true false +TypeLength 4 QT_Ora9DS java.lang.Integer LENGTH integer SYS FunctionParams 11 10 0 false false false false 0 true true true false +SCALE 5 QT_Ora9DS java.lang.Short SCALE short 6 5 0 false false false true 1 false true true true +Radix 4 QT_Ora9DS java.lang.Integer RADIX integer SYS FunctionParams 11 10 0 false false false false 0 true true true false +NULLABLE 4 QT_Ora9DS java.lang.Integer NULLABLE integer 11 10 0 false false false true 1 false true true true +Description 12 QT_Ora9DS java.lang.String REMARKS string SYS FunctionParams 4000 4000 0 false true false false 1 true true false false +CHAR_OCTET_LENGTH 12 QT_Ora9DS java.lang.String CHAR_OCTET_LENGTH string 4000 4000 0 false false false true 1 false true true true +Position 4 QT_Ora9DS java.lang.Integer ORDINAL_POSITION integer SYS FunctionParams 11 10 0 false false false false 0 true true true false +IS_NULLABLE 12 QT_Ora9DS java.lang.String IS_NULLABLE string 4000 4000 0 false false false true 1 false true true true +FunctionUID 12 QT_Ora9DS java.lang.String SPECIFIC_NAME string SYS FunctionParams 50 50 0 false true false false 0 true true false false diff --git a/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetFunctions.expected b/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetFunctions.expected new file mode 100644 index 0000000000..5e52550504 --- /dev/null +++ b/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetFunctions.expected @@ -0,0 +1,30 @@ +string string string string integer string +Function_CAT FUNCTION_SCHEM FUNCTION_NAME REMARKS FUNCTION_TYPE SPECIFIC_NAME +QT_Ora9DS pg_catalog asPGVector 1 tid:7ff2755e9621-e548fc4c-0000007b +QT_Ora9DS pg_catalog getOid 1 tid:7ff2755e9621-b5885e94-0000007c +QT_Ora9DS pg_catalog has_function_privilege 1 tid:7ff2755e9621-6e44e0cf-00000078 +QT_Ora9DS pg_catalog pg_client_encoding 1 tid:7ff2755e9621-267c14ff-0000007d +QT_Ora9DS pg_catalog pg_get_expr 1 tid:7ff2755e9621-e8caf286-00000079 +QT_Ora9DS pg_catalog pg_get_expr 1 tid:7ff2755e9621-e8caf286-0000007a +Row Count : 6 +getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable +VDBName 12 QT_Ora9DS java.lang.String Function_CAT string SYS Functions 255 255 0 false true false false 0 true true false false +SchemaName 12 QT_Ora9DS java.lang.String FUNCTION_SCHEM string SYS Functions 255 255 0 false true false false 1 true true false false +Name 12 QT_Ora9DS java.lang.String FUNCTION_NAME string SYS Functions 255 255 0 false true false false 0 true true false false +Description 12 QT_Ora9DS java.lang.String REMARKS string SYS Functions 4000 4000 0 false true false false 1 true true false false +FUNCTION_TYPE 4 QT_Ora9DS java.lang.Integer FUNCTION_TYPE integer 11 10 0 false false false true 1 false true true true +UID 12 QT_Ora9DS java.lang.String SPECIFIC_NAME string SYS Functions 50 50 0 false true false false 0 true true false false +string string string string integer string +Function_CAT FUNCTION_SCHEM FUNCTION_NAME REMARKS FUNCTION_TYPE SPECIFIC_NAME +QT_Ora9DS pg_catalog asPGVector 1 tid:7ff2755e9621-e548fc4c-0000007b +QT_Ora9DS pg_catalog pg_client_encoding 1 tid:7ff2755e9621-267c14ff-0000007d +QT_Ora9DS pg_catalog pg_get_expr 1 tid:7ff2755e9621-e8caf286-00000079 +QT_Ora9DS pg_catalog pg_get_expr 1 tid:7ff2755e9621-e8caf286-0000007a +Row Count : 4 +getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable +VDBName 12 QT_Ora9DS java.lang.String Function_CAT string SYS Functions 255 255 0 false true false false 0 true true false false +SchemaName 12 QT_Ora9DS java.lang.String FUNCTION_SCHEM string SYS Functions 255 255 0 false true false false 1 true true false false +Name 12 QT_Ora9DS java.lang.String FUNCTION_NAME string SYS Functions 255 255 0 false true false false 0 true true false false +Description 12 QT_Ora9DS java.lang.String REMARKS string SYS Functions 4000 4000 0 false true false false 1 true true false false +FUNCTION_TYPE 4 QT_Ora9DS java.lang.Integer FUNCTION_TYPE integer 11 10 0 false false false true 1 false true true true +UID 12 QT_Ora9DS java.lang.String SPECIFIC_NAME string SYS Functions 50 50 0 false true false false 0 true true false false diff --git a/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected b/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected index 2495552f69..bd2307cf63 100644 --- a/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected +++ b/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected @@ -93,7 +93,7 @@ oid attrelid attname 173 162 Scale 23 4 11 8 true false false 174 162 Radix 23 4 12 8 true false false 175 162 NullType 1043 -1 13 14 true false false -176 162 Description 1043 -1 14 259 false false false +176 162 Description 1043 -1 14 4004 false false false 178 177 VDBName 1043 -1 1 259 true false false 179 177 SchemaName 1043 -1 2 259 false false false 180 177 FunctionName 1043 -1 3 259 true false false @@ -103,7 +103,7 @@ oid attrelid attname 189 186 Name 1043 -1 3 259 true false false 190 186 NameInSource 1043 -1 4 259 false false false 191 186 UID 1043 -1 5 54 true false false -192 186 Description 1043 -1 6 259 false false false +192 186 Description 1043 -1 6 4004 false false false 193 186 IsVarArgs 16 1 7 5 false false false 195 194 VDBName 1043 -1 1 259 true false false 196 194 SchemaName 1043 -1 2 259 false false false diff --git a/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected b/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected index a4939c515e..404f0fd7d5 100644 --- a/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected +++ b/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected @@ -63,13 +63,13 @@ PartsSupplier SYS PartsSupplier SYS FunctionParams Scale 4 integer 10 0 10 0 0 11 NO NO PartsSupplier SYS FunctionParams Radix 4 integer 10 0 10 0 0 12 NO NO PartsSupplier SYS FunctionParams NullType 12 string 10 0 0 0 0 13 NO NO -PartsSupplier SYS FunctionParams Description 12 string 255 0 0 1 0 14 YES NO +PartsSupplier SYS FunctionParams Description 12 string 4000 0 0 1 0 14 YES NO PartsSupplier SYS Functions VDBName 12 string 255 0 0 0 0 1 NO NO PartsSupplier SYS Functions SchemaName 12 string 255 0 0 1 0 2 YES NO PartsSupplier SYS Functions Name 12 string 255 0 0 0 0 3 NO NO PartsSupplier SYS Functions NameInSource 12 string 255 0 0 1 0 4 YES NO PartsSupplier SYS Functions UID 12 string 50 0 0 0 0 5 NO NO -PartsSupplier SYS Functions Description 12 string 255 0 0 1 0 6 YES NO +PartsSupplier SYS Functions Description 12 string 4000 0 0 1 0 6 YES NO PartsSupplier SYS Functions IsVarArgs -7 boolean 1 0 10 1 0 7 YES NO PartsSupplier SYS KeyColumns VDBName 12 string 255 0 0 0 0 1 NO NO PartsSupplier SYS KeyColumns SchemaName 12 string 255 0 0 1 0 2 YES NO diff --git a/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected b/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected index 1bc9b8766c..8caaeabe62 100644 --- a/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected +++ b/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected @@ -17,8 +17,8 @@ PartsSupplier SYS PartsSupplier SYS Procedures Description 7 string 0 255 false true false true false false false Nullable -1 -1 Searchable java.lang.String 0 0 0 tid:2cb59cfd55db-3b85e6c0-00000072 PartsSupplier SYS DataTypes Description 18 string 0 255 false true false true false false false Nullable -1 -1 Searchable java.lang.String 0 0 0 tid:2cb59cfd55db-80061b6e-00000036 PartsSupplier SYS Keys Description 5 string 0 255 false true false true false false false Nullable -1 -1 Searchable java.lang.String 0 0 0 tid:2cb59cfd55db-84fac678-0000004d -PartsSupplier SYS FunctionParams Description 14 string 0 255 false true false true false false false Nullable -1 -1 Searchable java.lang.String 0 0 0 tid:2cb59cfd55db-a0f759ce-00000085 -PartsSupplier SYS Functions Description 6 string 0 255 false true false true false false false Nullable -1 -1 Searchable java.lang.String 0 0 0 tid:2cb59cfd55db-af0b5f47-0000008e +PartsSupplier SYS FunctionParams Description 14 string 0 4000 false true false true false false false Nullable -1 -1 Searchable java.lang.String 0 0 0 tid:2cb59cfd55db-a0f759ce-00000085 +PartsSupplier SYS Functions Description 6 string 0 4000 false true false true false false false Nullable -1 -1 Searchable java.lang.String 0 0 0 tid:2cb59cfd55db-af0b5f47-0000008e PartsSupplier SYS Tables Description 10 string 0 255 false true false true false false false Nullable -1 -1 Searchable java.lang.String 0 0 0 tid:2cb59cfd55db-b57b853c-000000bd PartsSupplier SYS ProcedureParams Description 15 string 0 255 false true false true false false false Nullable -1 -1 Searchable java.lang.String 0 0 0 tid:2cb59cfd55db-b5a23a0e-00000066 PartsSupplier SYS Schemas Description 5 string 0 255 false true false true false false false Nullable -1 -1 Searchable java.lang.String 0 0 0 tid:2cb59cfd55db-b9b3a281-000000ae diff --git a/test-integration/common/src/test/resources/TestSystemVirtualModel/testFunctionParams.expected b/test-integration/common/src/test/resources/TestSystemVirtualModel/testFunctionParams.expected index d6b107769b..a391ce4478 100644 --- a/test-integration/common/src/test/resources/TestSystemVirtualModel/testFunctionParams.expected +++ b/test-integration/common/src/test/resources/TestSystemVirtualModel/testFunctionParams.expected @@ -1,20 +1,20 @@ string string string string string string integer string integer integer integer integer string string VDBName SchemaName FunctionName FunctionUID Name DataType Position Type Precision TypeLength Scale Radix NullType Description -PartsSupplier pg_catalog pg_client_encoding tid:7ff2755e9621-267c14ff-0000007d result ReturnValue 0 string 0 4000 0 0 Nullable -PartsSupplier pg_catalog has_function_privilege tid:7ff2755e9621-6e44e0cf-00000078 param1 In 1 integer 10 4 0 10 Nullable -PartsSupplier pg_catalog has_function_privilege tid:7ff2755e9621-6e44e0cf-00000078 param2 In 2 string 0 4000 0 0 Nullable -PartsSupplier pg_catalog has_function_privilege tid:7ff2755e9621-6e44e0cf-00000078 result ReturnValue 0 boolean 1 1 0 10 Nullable -PartsSupplier pg_catalog getOid tid:7ff2755e9621-b5885e94-0000007c param1 In 1 string 0 4000 0 0 Nullable -PartsSupplier pg_catalog getOid tid:7ff2755e9621-b5885e94-0000007c result ReturnValue 0 integer 10 4 0 10 Nullable -PartsSupplier pg_catalog asPGVector tid:7ff2755e9621-e548fc4c-0000007b param1 In 1 object 0 2147483647 0 0 Nullable -PartsSupplier pg_catalog asPGVector tid:7ff2755e9621-e548fc4c-0000007b result ReturnValue 0 object 0 2147483647 0 0 Nullable -PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-00000079 param1 In 1 string 0 4000 0 0 Nullable -PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-00000079 param2 In 2 integer 10 4 0 10 Nullable -PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-00000079 result ReturnValue 0 string 0 4000 0 0 Nullable -PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-0000007a param1 In 1 string 0 4000 0 0 Nullable -PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-0000007a param2 In 2 integer 10 4 0 10 Nullable -PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-0000007a param3 In 3 boolean 1 1 0 10 Nullable -PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-0000007a result ReturnValue 0 string 0 4000 0 0 Nullable +PartsSupplier pg_catalog pg_client_encoding tid:7ff2755e9621-267c14ff-0000007d result string 0 ReturnValue 0 4000 0 0 Nullable +PartsSupplier pg_catalog has_function_privilege tid:7ff2755e9621-6e44e0cf-00000078 param1 integer 1 In 10 4 0 10 Nullable +PartsSupplier pg_catalog has_function_privilege tid:7ff2755e9621-6e44e0cf-00000078 param2 string 2 In 0 4000 0 0 Nullable +PartsSupplier pg_catalog has_function_privilege tid:7ff2755e9621-6e44e0cf-00000078 result boolean 0 ReturnValue 1 1 0 10 Nullable +PartsSupplier pg_catalog getOid tid:7ff2755e9621-b5885e94-0000007c param1 string 1 In 0 4000 0 0 Nullable +PartsSupplier pg_catalog getOid tid:7ff2755e9621-b5885e94-0000007c result integer 0 ReturnValue 10 4 0 10 Nullable +PartsSupplier pg_catalog asPGVector tid:7ff2755e9621-e548fc4c-0000007b param1 object 1 In 0 2147483647 0 0 Nullable +PartsSupplier pg_catalog asPGVector tid:7ff2755e9621-e548fc4c-0000007b result object 0 ReturnValue 0 2147483647 0 0 Nullable +PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-00000079 param1 string 1 In 0 4000 0 0 Nullable +PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-00000079 param2 integer 2 In 10 4 0 10 Nullable +PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-00000079 result string 0 ReturnValue 0 4000 0 0 Nullable +PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-0000007a param1 string 1 In 0 4000 0 0 Nullable +PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-0000007a param2 integer 2 In 10 4 0 10 Nullable +PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-0000007a param3 boolean 3 In 1 1 0 10 Nullable +PartsSupplier pg_catalog pg_get_expr tid:7ff2755e9621-e8caf286-0000007a result string 0 ReturnValue 0 4000 0 0 Nullable Row Count : 15 getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable VDBName 12 PartsSupplier java.lang.String VDBName string SYS FunctionParams 255 255 0 false true false false 0 true true false false @@ -30,4 +30,4 @@ TypeLength 4 PartsSupplier java.lang.Integer TypeLength Scale 4 PartsSupplier java.lang.Integer Scale integer SYS FunctionParams 11 10 0 false false false false 0 true true true false Radix 4 PartsSupplier java.lang.Integer Radix integer SYS FunctionParams 11 10 0 false false false false 0 true true true false NullType 12 PartsSupplier java.lang.String NullType string SYS FunctionParams 10 10 0 false true false false 0 true true false false -Description 12 PartsSupplier java.lang.String Description string SYS FunctionParams 255 255 0 false true false false 1 true true false false +Description 12 PartsSupplier java.lang.String Description string SYS FunctionParams 4000 4000 0 false true false false 1 true true false false diff --git a/test-integration/common/src/test/resources/TestSystemVirtualModel/testFunctions.expected b/test-integration/common/src/test/resources/TestSystemVirtualModel/testFunctions.expected index a0d8b3833c..10f25b6be8 100644 --- a/test-integration/common/src/test/resources/TestSystemVirtualModel/testFunctions.expected +++ b/test-integration/common/src/test/resources/TestSystemVirtualModel/testFunctions.expected @@ -13,5 +13,5 @@ SchemaName 12 PartsSupplier java.lang.String SchemaName Name 12 PartsSupplier java.lang.String Name string SYS Functions 255 255 0 false true false false 0 true true false false NameInSource 12 PartsSupplier java.lang.String NameInSource string SYS Functions 255 255 0 false true false false 1 true true false false UID 12 PartsSupplier java.lang.String UID string SYS Functions 50 50 0 false true false false 0 true true false false -Description 12 PartsSupplier java.lang.String Description string SYS Functions 255 255 0 false true false false 1 true true false false +Description 12 PartsSupplier java.lang.String Description string SYS Functions 4000 4000 0 false true false false 1 true true false false IsVarArgs -7 PartsSupplier java.lang.Boolean IsVarArgs boolean SYS Functions 5 1 0 false false false false 1 true true false false