Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable dialects to add property validators #138

Closed
ckunki opened this issue Mar 8, 2023 · 0 comments · Fixed by #139
Closed

Enable dialects to add property validators #138

ckunki opened this issue Mar 8, 2023 · 0 comments · Fixed by #139
Assignees
Labels
feature Product feature

Comments

@ckunki
Copy link
Collaborator

ckunki commented Mar 8, 2023

VSEXA for example in method

Currently class ExasolSqlDialectin VSEXA overrides method AbstractSqlDialect .validateProperties() to perform additional validations for additional properties specific to this SQL dialect:

  @Override
    public void validateProperties() throws PropertyValidationException {
        super.validateProperties();
        checkImportPropertyConsistency(EXASOL_IMPORT_PROPERTY, EXASOL_CONNECTION_PROPERTY);
        validateBooleanProperty(EXASOL_IMPORT_PROPERTY);
        validateBooleanProperty(IS_LOCAL_PROPERTY);
    }

https://github.com/exasol/exasol-virtual-schema/blob/main/src/main/java/com/exasol/adapter/dialects/exasol/ExasolSqlDialect.java#L140

In future it should be sufficient to add validators to the existing validator chain already used by AbstractSqlDialect.
Currently this is not possible, since the chain is private.
The current ticket therefore proposes to add a protected method to class AbstractSqlDialect enabling each dialect to add additional property validators in its constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Product feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant