diff --git a/doc/changes/changes_2.4.1.md b/doc/changes/changes_2.4.1.md index cf99a3d..a8b8716 100644 --- a/doc/changes/changes_2.4.1.md +++ b/doc/changes/changes_2.4.1.md @@ -4,12 +4,13 @@ Code name: Maintenance ## Summary -Updated dependencies to replace `com.exasol:exasol-script-api` by `udf-api-java/1.0.1` as `com.exasol:exasol-script-api` had been available on discontinued maven repository `maven.exasol.com`. +Renamed error codes from `VS-ORA` to `VSORA` and updated dependencies to replace `com.exasol:exasol-script-api` by `udf-api-java/1.0.1` as `com.exasol:exasol-script-api` had been available on discontinued maven repository `maven.exasol.com`. Please note that updated dependency `virtual-schema-common-jdbc` adds support for a new adapter property [`MAX_TABLE_COUNT`](https://github.com/exasol/virtual-schema-common-jdbc#property-max_table_count) and fixes ambiguous results by escaping SQL wildcards such as underscore `_` and percent `%` in names of catalogs, schemas, and tables when retrieving column metadata from JDBC driver. ## Bugfixes +* #25: Renamed error codes from `VS-ORA` to `VSORA`. * #30: Updated dependencies ## Dependency Updates diff --git a/error_code_config.yml b/error_code_config.yml index 7a5233a..f7869d1 100644 --- a/error_code_config.yml +++ b/error_code_config.yml @@ -1,5 +1,5 @@ error-tags: - VS-ORA: + VSORA: packages: - com.exasol.adapter.dialects.oracle - com.exasol.closeafterall diff --git a/src/main/java/com/exasol/adapter/dialects/oracle/OracleConnectionDefinitionBuilder.java b/src/main/java/com/exasol/adapter/dialects/oracle/OracleConnectionDefinitionBuilder.java index 411e526..adccefd 100644 --- a/src/main/java/com/exasol/adapter/dialects/oracle/OracleConnectionDefinitionBuilder.java +++ b/src/main/java/com/exasol/adapter/dialects/oracle/OracleConnectionDefinitionBuilder.java @@ -26,7 +26,7 @@ private String buildImportFromOraConnectionDefinition(final AdapterProperties pr if (properties.containsKey(ORACLE_CONNECTION_NAME_PROPERTY)) { return buildOracleConnectionDefinitionFromOracleConnectionOnly(properties); } else { - throw new IllegalArgumentException(ExaError.messageBuilder("E-VS-ORA-3") + throw new IllegalArgumentException(ExaError.messageBuilder("E-VSORA-3") .message("If you enable IMPORT FROM ORA with property {{OracleImportProperty}} " + "you also need to provide the name of an Oracle connection with {{OracleConnectionNameProperty}}.") .parameter("OracleImportProperty", ORACLE_IMPORT_PROPERTY) diff --git a/src/main/java/com/exasol/adapter/dialects/oracle/OracleIdentifier.java b/src/main/java/com/exasol/adapter/dialects/oracle/OracleIdentifier.java index e5da9aa..90b42dd 100644 --- a/src/main/java/com/exasol/adapter/dialects/oracle/OracleIdentifier.java +++ b/src/main/java/com/exasol/adapter/dialects/oracle/OracleIdentifier.java @@ -35,7 +35,7 @@ public static OracleIdentifier of(final String id) { if (validate(id)) { return new OracleIdentifier(id); } else { - throw new AssertionError(ExaError.messageBuilder("E-VS-ORA-2") + throw new AssertionError(ExaError.messageBuilder("E-VSORA-2") .message("Unable to create identifier {{id}} because it contains illegal characters." // + " For information about valid identifiers, please refer to" // + " https://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements008.htm") diff --git a/src/main/java/com/exasol/adapter/dialects/oracle/OracleSqlDialect.java b/src/main/java/com/exasol/adapter/dialects/oracle/OracleSqlDialect.java index 29c0741..56c5532 100644 --- a/src/main/java/com/exasol/adapter/dialects/oracle/OracleSqlDialect.java +++ b/src/main/java/com/exasol/adapter/dialects/oracle/OracleSqlDialect.java @@ -169,7 +169,7 @@ protected RemoteMetadataReader createRemoteMetadataReader() { try { return new OracleMetadataReader(this.connectionFactory.getConnection(), this.properties); } catch (final SQLException exception) { - throw new RemoteMetadataReaderException(ExaError.messageBuilder("E-VS-ORA-1") + throw new RemoteMetadataReaderException(ExaError.messageBuilder("E-VSORA-1") .message("Unable to create Oracle remote metadata reader. Caused by: {{cause|uq}}") .parameter("cause", exception.getMessage()).toString(), exception); } @@ -182,7 +182,7 @@ protected QueryRewriter createQueryRewriter() { return new OracleQueryRewriter(this, this.createRemoteMetadataReader(), this.connectionFactory.getConnection(), this.properties); } catch (final SQLException exception) { - throw new RemoteMetadataReaderException(ExaError.messageBuilder("E-VS-ORA-4") + throw new RemoteMetadataReaderException(ExaError.messageBuilder("E-VSORA-4") .message("Unable to create Oracle remote metadata reader. Caused by: {{cause|uq}}") .parameter("cause", exception.getMessage()).toString(), exception); } @@ -194,4 +194,4 @@ protected QueryRewriter createQueryRewriter() { private boolean isImportFromOraEnabled() { return this.properties.isEnabled(OracleProperties.ORACLE_IMPORT_PROPERTY); } -} \ No newline at end of file +} diff --git a/src/test/java/com/exasol/adapter/dialects/oracle/OracleConnectionDefinitionBuilderTest.java b/src/test/java/com/exasol/adapter/dialects/oracle/OracleConnectionDefinitionBuilderTest.java index b2224a3..557fb28 100644 --- a/src/test/java/com/exasol/adapter/dialects/oracle/OracleConnectionDefinitionBuilderTest.java +++ b/src/test/java/com/exasol/adapter/dialects/oracle/OracleConnectionDefinitionBuilderTest.java @@ -33,6 +33,6 @@ void testBuildConnectionDefinitionMissingPropertyException() { CONNECTION_NAME_PROPERTY, "ora_connection")); final IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> this.connectionDefinitionBuilder.buildConnectionDefinition(properties, null)); - assertThat(exception.getMessage(), containsString("E-VS-ORA-3")); + assertThat(exception.getMessage(), containsString("E-VSORA-3")); } } \ No newline at end of file diff --git a/src/test/java/com/exasol/adapter/dialects/oracle/OracleIdentifierTest.java b/src/test/java/com/exasol/adapter/dialects/oracle/OracleIdentifierTest.java index f7dac75..dfc4601 100644 --- a/src/test/java/com/exasol/adapter/dialects/oracle/OracleIdentifierTest.java +++ b/src/test/java/com/exasol/adapter/dialects/oracle/OracleIdentifierTest.java @@ -22,7 +22,7 @@ void testCreateValidIdentifier(final String identifier) { @ValueSource(strings = { "\"testtable\"", "test\"table" }) void testCreateInvalidIdentifier(final String identifier) { final AssertionError assertionError = assertThrows(AssertionError.class, () -> OracleIdentifier.of(identifier)); - assertThat(assertionError.getMessage(), containsString("E-VS-ORA-2")); + assertThat(assertionError.getMessage(), containsString("E-VSORA-2")); } @Test diff --git a/src/test/java/com/exasol/adapter/dialects/oracle/OracleSqlDialectTest.java b/src/test/java/com/exasol/adapter/dialects/oracle/OracleSqlDialectTest.java index 65f761f..be68a01 100644 --- a/src/test/java/com/exasol/adapter/dialects/oracle/OracleSqlDialectTest.java +++ b/src/test/java/com/exasol/adapter/dialects/oracle/OracleSqlDialectTest.java @@ -93,7 +93,7 @@ void testCreateRemoteMetadataReaderConnectionFails() throws SQLException { when(this.connectionFactoryMock.getConnection()).thenThrow(new SQLException()); final RemoteMetadataReaderException exception = assertThrows(RemoteMetadataReaderException.class, this.dialect::createRemoteMetadataReader); - assertThat(exception.getMessage(), containsString("E-VS-ORA-1")); + assertThat(exception.getMessage(), containsString("E-VSORA-1")); } @CsvSource({ "FALSE, FALSE, JDBC", // diff --git a/src/test/java/com/exasol/closeafterall/CloseAfterAllExtension.java b/src/test/java/com/exasol/closeafterall/CloseAfterAllExtension.java index ca6ea9a..77cded6 100644 --- a/src/test/java/com/exasol/closeafterall/CloseAfterAllExtension.java +++ b/src/test/java/com/exasol/closeafterall/CloseAfterAllExtension.java @@ -39,7 +39,7 @@ private void closeObject(final Field field, final Object annotatedObject) throws if (annotatedObject instanceof Closeable) { ((Closeable) annotatedObject).close(); } else { - throw new IllegalStateException(ExaError.messageBuilder("E-VS-ORA-9").message( + throw new IllegalStateException(ExaError.messageBuilder("E-VSORA-9").message( "Could not close the field {{field}} annotated with @CloseAfterAll since it does not implement Closable.") .parameter("field", field.getName()).toString()); }