-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Christoph Pirkl <christoph.pirkl@exasol.com>
- Loading branch information
1 parent
0b9817b
commit 8136ef9
Showing
16 changed files
with
212 additions
and
66 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Exasol Virtual Schema 7.1.0, released 2023-03-10 | ||
|
||
Code name: Mandatory Property SCHEMA_NAME | ||
|
||
## Summary | ||
|
||
This release updates VSEXA to take virtual schema property `SCHEMA_NAME` as mandatory in order to fix a bug when the property is not set. | ||
|
||
## Bugfixes | ||
|
||
* #92: Fixed broken handling of tables when `SCHEMA_NAME` property is not set | ||
|
||
## Dependency Updates | ||
|
||
### Compile Dependency Updates | ||
|
||
* Updated `com.exasol:error-reporting-java:1.0.0` to `1.0.1` | ||
* Updated `com.exasol:virtual-schema-common-jdbc:10.1.0` to `10.2.0` | ||
|
||
### Test Dependency Updates | ||
|
||
* Updated `com.exasol:exasol-testcontainers:6.5.0` to `6.5.1` | ||
* Updated `com.exasol:test-db-builder-java:3.4.1` to `3.4.2` | ||
* Updated `com.exasol:virtual-schema-common-jdbc:10.1.0` to `10.2.0` | ||
* Updated `org.mockito:mockito-junit-jupiter:5.0.0` to `5.1.1` | ||
|
||
### Plugin Dependency Updates | ||
|
||
* Updated `com.exasol:error-code-crawler-maven-plugin:1.2.1` to `1.2.2` | ||
* Updated `com.exasol:project-keeper-maven-plugin:2.9.1` to `2.9.3` | ||
* Updated `org.apache.maven.plugins:maven-dependency-plugin:3.3.0` to `3.5.0` | ||
* Updated `org.apache.maven.plugins:maven-failsafe-plugin:3.0.0-M7` to `3.0.0-M8` | ||
* Updated `org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7` to `3.0.0-M8` | ||
* Updated `org.codehaus.mojo:versions-maven-plugin:2.13.0` to `2.14.2` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ error-tags: | |
VSEXA: | ||
packages: | ||
- com.exasol.adapter.dialects.exasol | ||
highest-index: 5 | ||
highest-index: 6 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/main/java/com/exasol/adapter/dialects/exasol/MandatoryProperty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.exasol.adapter.dialects.exasol; | ||
|
||
import com.exasol.adapter.AdapterProperties; | ||
import com.exasol.adapter.properties.PropertyValidationException; | ||
import com.exasol.adapter.properties.PropertyValidator; | ||
import com.exasol.errorreporting.ExaError; | ||
|
||
/** | ||
* {@link PropertyValidator} for validation of a mandatory property. | ||
*/ | ||
public class MandatoryProperty implements PropertyValidator { | ||
/** | ||
* Create a new validator. | ||
* | ||
* @param dialect name of the current virtual schema dialect to be included in error message | ||
* @param element label for the missing property value | ||
* @param property name of the property | ||
* @return new instance of {@link PropertyValidator} for validation of a mandatory property. | ||
*/ | ||
public static PropertyValidator validator(final String dialect, final String element, final String property) { | ||
return new MandatoryProperty(dialect, element, property); | ||
} | ||
|
||
private final String dialect; | ||
private final String element; | ||
private final String property; | ||
|
||
private MandatoryProperty(final String dialect, final String element, final String property) { | ||
this.dialect = dialect; | ||
this.element = element; | ||
this.property = property; | ||
} | ||
|
||
@Override | ||
public void validate(final AdapterProperties properties) throws PropertyValidationException { | ||
if (!properties.hasSchemaName()) { | ||
throw new PropertyValidationException(ExaError.messageBuilder("E-VSEXA-6") | ||
.message("{{dialect|uq}} virtual schema dialect requires to specify a {{element1|uq}}.", | ||
this.dialect, this.element) // | ||
.mitigation("Please specify a {{element2|uq}} using property {{property}}.", // | ||
this.element, this.property) // | ||
.toString()); | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/com/exasol/adapter/dialects/exasol/SchemaNameProperty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.exasol.adapter.dialects.exasol; | ||
|
||
import com.exasol.adapter.AdapterProperties; | ||
import com.exasol.adapter.properties.PropertyValidator; | ||
|
||
/** | ||
* Validator for property {@link AdapterProperties#SCHEMA_NAME_PROPERTY} | ||
*/ | ||
public class SchemaNameProperty { | ||
/** | ||
* @param dialect name of the current dialect | ||
* @return {@link PropertyValidator} for mandatory property {@link AdapterProperties#SCHEMA_NAME_PROPERTY}. | ||
*/ | ||
public static PropertyValidator validator(final String dialect) { | ||
return MandatoryProperty.validator(dialect, "schema name", AdapterProperties.SCHEMA_NAME_PROPERTY); | ||
} | ||
|
||
private SchemaNameProperty() { | ||
// only static usage | ||
} | ||
} |
Oops, something went wrong.