diff --git a/.gitattributes b/.gitattributes index 6f0b993..f1e6c1c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,8 +3,9 @@ dependencies.md linguist-genera doc/changes/changelog.md linguist-generated=true .github/workflows/broken_links_checker.yml linguist-generated=true .github/workflows/ci-build-next-java.yml linguist-generated=true -.github/workflows/ci-build.yml linguist-generated=true .github/workflows/dependencies_check.yml linguist-generated=true -.github/workflows/release_droid_prepare_original_checksum.yml linguist-generated=true .github/workflows/release_droid_print_quick_checksum.yml linguist-generated=true .github/workflows/release_droid_upload_github_release_assets.yml linguist-generated=true + +.settings/org.eclipse.jdt.core.prefs linguist-generated=true +.settings/org.eclipse.jdt.ui.prefs linguist-generated=true diff --git a/.github/workflows/broken_links_checker.yml b/.github/workflows/broken_links_checker.yml index 29071df..82ec1cd 100644 --- a/.github/workflows/broken_links_checker.yml +++ b/.github/workflows/broken_links_checker.yml @@ -15,13 +15,18 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Configure broken links checker run: | mkdir -p ./target - echo '{ "aliveStatusCodes": [429, 200], "ignorePatterns": [{"pattern": "^https?://(www.)?opensource.org"}] }' > ./target/broken_links_checker.json + echo '{"aliveStatusCodes": [429, 200], "ignorePatterns": [' \ + '{"pattern": "^https?://(www|dev).mysql.com/"},' \ + '{"pattern": "^https?://(www.)?opensource.org"}' \ + '{"pattern": "^https?://(www.)?eclipse.org"}' \ + '{"pattern": "^https?://projects.eclipse.org"}' \ + ']}' > ./target/broken_links_checker.json - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: - use-quiet-mode: 'yes' - use-verbose-mode: 'yes' - config-file: ./target/broken_links_checker.json \ No newline at end of file + use-quiet-mode: "yes" + use-verbose-mode: "yes" + config-file: ./target/broken_links_checker.json diff --git a/.github/workflows/ci-build-next-java.yml b/.github/workflows/ci-build-next-java.yml index 6a1006c..7cbab08 100644 --- a/.github/workflows/ci-build-next-java.yml +++ b/.github/workflows/ci-build-next-java.yml @@ -14,18 +14,18 @@ jobs: cancel-in-progress: true steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK 17 uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 17 - cache: 'maven' + cache: "maven" - name: Run tests and build with Maven run: | - mvn --batch-mode --update-snapshots clean package -DtrimStackTrace=false \ + mvn --batch-mode --update-snapshots clean package -DtrimStackTrace=false \ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn - name: Publish Test Report uses: scacap/action-surefire-report@v1 diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index e520870..4d3ebab 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -8,21 +8,27 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 # UDFs fail with "VM error: Internal error: VM crashed" on ubuntu-latest concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true steps: + - name: Free Disk Space + run: | + sudo rm -rf /usr/local/lib/android + sudo rm -rf /usr/share/dotnet - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up JDK 11 + - name: Set up JDK 11 & 17 uses: actions/setup-java@v3 with: - distribution: 'temurin' - java-version: 11 - cache: 'maven' + distribution: "temurin" + java-version: | + 17 + 11 + cache: "maven" - name: Cache SonarCloud packages uses: actions/cache@v3 with: @@ -33,7 +39,7 @@ jobs: run: echo 'testcontainers.reuse.enable=true' > "$HOME/.testcontainers.properties" - name: Run tests and build with Maven run: | - mvn --batch-mode clean verify \ + JAVA_HOME=$JAVA_HOME_11_X64 mvn --batch-mode clean verify \ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ -DtrimStackTrace=false - name: Publish Test Report @@ -44,12 +50,12 @@ jobs: - name: Sonar analysis if: ${{ env.SONAR_TOKEN != null }} run: | - mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ + JAVA_HOME=$JAVA_HOME_17_X64 mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ -DtrimStackTrace=false \ -Dsonar.organization=exasol \ -Dsonar.host.url=https://sonarcloud.io \ - -Dsonar.login=$SONAR_TOKEN + -Dsonar.token=$SONAR_TOKEN env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/dependencies_check.yml b/.github/workflows/dependencies_check.yml index b2ab231..3059964 100644 --- a/.github/workflows/dependencies_check.yml +++ b/.github/workflows/dependencies_check.yml @@ -9,12 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK 11 uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 11 - cache: 'maven' + cache: "maven" - name: Checking dependencies for vulnerabilities - run: mvn --batch-mode org.sonatype.ossindex.maven:ossindex-maven-plugin:audit -f pom.xml \ No newline at end of file + run: mvn --batch-mode org.sonatype.ossindex.maven:ossindex-maven-plugin:audit -f pom.xml diff --git a/.github/workflows/release_droid_prepare_original_checksum.yml b/.github/workflows/release_droid_prepare_original_checksum.yml index 4a980f8..843604c 100644 --- a/.github/workflows/release_droid_prepare_original_checksum.yml +++ b/.github/workflows/release_droid_prepare_original_checksum.yml @@ -5,18 +5,22 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 # UDFs fail with "VM error: Internal error: VM crashed" on ubuntu-latest steps: + - name: Free Disk Space + run: | + sudo rm -rf /usr/local/lib/android + sudo rm -rf /usr/share/dotnet - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK 11 uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 11 - cache: 'maven' + cache: "maven" - name: Enable testcontainer reuse run: echo 'testcontainers.reuse.enable=true' > "$HOME/.testcontainers.properties" - name: Run tests and build with Maven @@ -28,4 +32,4 @@ jobs: with: name: original_checksum retention-days: 5 - path: original_checksum \ No newline at end of file + path: original_checksum diff --git a/.github/workflows/release_droid_print_quick_checksum.yml b/.github/workflows/release_droid_print_quick_checksum.yml index 8add957..aed4444 100644 --- a/.github/workflows/release_droid_print_quick_checksum.yml +++ b/.github/workflows/release_droid_print_quick_checksum.yml @@ -8,17 +8,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK 11 uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 11 - cache: 'maven' + cache: "maven" - name: Build with Maven skipping tests run: mvn --batch-mode clean verify -DskipTests - name: Print checksum run: echo 'checksum_start==';find target -maxdepth 1 -name *.jar -exec sha256sum "{}" + | xargs;echo '==checksum_end' - diff --git a/.github/workflows/release_droid_upload_github_release_assets.yml b/.github/workflows/release_droid_upload_github_release_assets.yml index 1fd0b60..7ae8bbb 100644 --- a/.github/workflows/release_droid_upload_github_release_assets.yml +++ b/.github/workflows/release_droid_upload_github_release_assets.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: upload_url: - description: 'Assets upload URL' + description: "Assets upload URL" required: true jobs: @@ -12,19 +12,21 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK 11 uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 11 - cache: 'maven' + cache: "maven" - name: Build with Maven skipping tests run: mvn --batch-mode clean verify -DskipTests - name: Generate sha256sum files - run: find target -maxdepth 1 -name *.jar -exec bash -c 'sha256sum {} > {}.sha256' \; + run: | + cd target + find . -maxdepth 1 -name \*.jar -exec bash -c 'sha256sum {} > {}.sha256' \; - name: Upload assets to the GitHub release draft uses: shogo82148/actions-upload-release-asset@v1 with: @@ -39,4 +41,4 @@ jobs: uses: shogo82148/actions-upload-release-asset@v1 with: upload_url: ${{ github.event.inputs.upload_url }} - asset_path: target/error_code_report.json \ No newline at end of file + asset_path: target/error_code_report.json diff --git a/.gitignore b/.gitignore index 088f189..1088d88 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ # Eclipse and Maven .classpath .project +/.settings/org.eclipse.core.resources.prefs +/.settings/org.eclipse.m2e.core.prefs +/.settings/org.eclipse.jdt.apt.core.prefs # .settings : we need Eclipse settings for code formatter and clean-up rules target .cache @@ -32,7 +35,6 @@ pom.xml.versionsBackup *.orig *.old *.md.html -.vscode/ *.flattened-pom.xml /.apt_generated/ diff --git a/.project-keeper.yml b/.project-keeper.yml index 1297b39..d1ed13d 100644 --- a/.project-keeper.yml +++ b/.project-keeper.yml @@ -5,3 +5,6 @@ sources: - integration_tests - udf_coverage - jar_artifact +excludes: + - "E-PK-CORE-18: Outdated content: '.github/workflows/ci-build.yml'" + - "E-PK-CORE-18: Outdated content: '.github/workflows/release_droid_prepare_original_checksum.yml'" diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 29abf99..0000000 --- a/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,6 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/main/java=UTF-8 -encoding//src/main/resources=UTF-8 -encoding//src/test/java=UTF-8 -encoding//src/test/resources=UTF-8 -encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 8b5a9aa..bb40c3f 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -111,7 +111,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.processAnnotations=enabled +org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f..0000000 --- a/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f8797c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,21 @@ +{ + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.organizeImports": true, + "source.generate.finalModifiers": true, + "source.fixAll": true + }, + "java.codeGeneration.useBlocks": true, + "java.saveActions.organizeImports": true, + "java.sources.organizeImports.starThreshold": 3, + "java.sources.organizeImports.staticStarThreshold": 3, + "java.test.config": { + "vmArgs": [ + "-Djava.util.logging.config.file=src/test/resources/logging.properties" + ] + }, + "sonarlint.connectedMode.project": { + "connectionId": "exasol", + "projectKey": "com.exasol:oracle-virtual-schema" + } +} diff --git a/dependencies.md b/dependencies.md index d2aa1e0..75a32e0 100644 --- a/dependencies.md +++ b/dependencies.md @@ -15,109 +15,113 @@ | Dependency | License | | ----------------------------------------------- | --------------------------------- | | [Virtual Schema Common JDBC][0] | [MIT License][1] | -| [Hamcrest][10] | [BSD License 3][11] | -| [JUnit Jupiter (Aggregator)][12] | [Eclipse Public License v2.0][13] | -| [mockito-junit-jupiter][14] | [The MIT License][15] | -| [EqualsVerifier | release normal jar][16] | [Apache License, Version 2.0][17] | -| [SLF4J JDK14 Binding][18] | [MIT License][19] | -| [Test containers for Exasol on Docker][20] | [MIT License][21] | -| [Testcontainers :: JUnit Jupiter Extension][22] | [MIT][23] | -| [Testcontainers :: JDBC :: Oracle XE][22] | [MIT][23] | -| [Test Database Builder for Java][26] | [MIT License][27] | -| [udf-debugging-java][28] | [MIT License][29] | -| [Matcher for SQL Result Sets][30] | [MIT License][31] | -| [virtual-schema-shared-integration-tests][32] | [MIT License][33] | -| [JaCoCo :: Agent][34] | [Eclipse Public License 2.0][35] | +| [Hamcrest][8] | [BSD License 3][9] | +| [JUnit Jupiter (Aggregator)][10] | [Eclipse Public License v2.0][11] | +| [mockito-junit-jupiter][12] | [The MIT License][13] | +| [EqualsVerifier \| release normal jar][14] | [Apache License, Version 2.0][15] | +| [SLF4J JDK14 Provider][16] | [MIT License][17] | +| [Test containers for Exasol on Docker][18] | [MIT License][19] | +| [Testcontainers :: JUnit Jupiter Extension][20] | [MIT][21] | +| [Testcontainers :: JDBC :: Oracle XE][20] | [MIT][21] | +| [Test Database Builder for Java][22] | [MIT License][23] | +| [udf-debugging-java][24] | [MIT License][25] | +| [Matcher for SQL Result Sets][26] | [MIT License][27] | +| [virtual-schema-shared-integration-tests][28] | [MIT License][29] | +| [JaCoCo :: Agent][30] | [Eclipse Public License 2.0][31] | ## Runtime Dependencies | Dependency | License | | ----------------------------- | -------------------------------------------------------------------------------------------------------------- | -| [JSON-P Default Provider][36] | [Eclipse Public License 2.0][37]; [GNU General Public License, version 2 with the GNU Classpath Exception][38] | +| [JSON-P Default Provider][32] | [Eclipse Public License 2.0][33]; [GNU General Public License, version 2 with the GNU Classpath Exception][34] | ## Plugin Dependencies | Dependency | License | | ------------------------------------------------------- | ---------------------------------------------- | -| [SonarQube Scanner for Maven][39] | [GNU LGPL 3][40] | -| [Apache Maven Compiler Plugin][41] | [Apache License, Version 2.0][17] | -| [Apache Maven Enforcer Plugin][43] | [Apache License, Version 2.0][17] | -| [Maven Flatten Plugin][45] | [Apache Software Licenese][46] | -| [org.sonatype.ossindex.maven:ossindex-maven-plugin][47] | [ASL2][46] | -| [Reproducible Build Maven Plugin][49] | [Apache 2.0][46] | -| [Maven Surefire Plugin][51] | [Apache License, Version 2.0][17] | -| [Versions Maven Plugin][53] | [Apache License, Version 2.0][17] | -| [Project keeper maven plugin][55] | [The MIT License][56] | -| [Apache Maven Assembly Plugin][57] | [Apache License, Version 2.0][17] | -| [Apache Maven JAR Plugin][59] | [Apache License, Version 2.0][17] | -| [Artifact reference checker and unifier][61] | [MIT][62] | -| [Apache Maven Dependency Plugin][63] | [Apache License, Version 2.0][17] | -| [Maven Failsafe Plugin][65] | [Apache License, Version 2.0][17] | -| [JaCoCo :: Maven Plugin][67] | [Eclipse Public License 2.0][35] | -| [error-code-crawler-maven-plugin][69] | [MIT][62] | -| [Maven Clean Plugin][71] | [The Apache Software License, Version 2.0][46] | -| [Maven Resources Plugin][73] | [The Apache Software License, Version 2.0][46] | -| [Maven Install Plugin][75] | [The Apache Software License, Version 2.0][46] | -| [Maven Deploy Plugin][77] | [The Apache Software License, Version 2.0][46] | -| [Maven Site Plugin 3][79] | [The Apache Software License, Version 2.0][46] | +| [SonarQube Scanner for Maven][35] | [GNU LGPL 3][36] | +| [Apache Maven Compiler Plugin][37] | [Apache-2.0][15] | +| [Apache Maven Enforcer Plugin][38] | [Apache-2.0][15] | +| [Maven Flatten Plugin][39] | [Apache Software Licenese][15] | +| [org.sonatype.ossindex.maven:ossindex-maven-plugin][40] | [ASL2][41] | +| [Maven Surefire Plugin][42] | [Apache-2.0][15] | +| [Versions Maven Plugin][43] | [Apache License, Version 2.0][15] | +| [duplicate-finder-maven-plugin Maven Mojo][44] | [Apache License 2.0][45] | +| [Project keeper maven plugin][46] | [The MIT License][47] | +| [Apache Maven Assembly Plugin][48] | [Apache-2.0][15] | +| [Apache Maven JAR Plugin][49] | [Apache License, Version 2.0][15] | +| [Artifact reference checker and unifier][50] | [MIT License][51] | +| [Apache Maven Dependency Plugin][52] | [Apache-2.0][15] | +| [Maven Failsafe Plugin][53] | [Apache-2.0][15] | +| [JaCoCo :: Maven Plugin][54] | [Eclipse Public License 2.0][31] | +| [error-code-crawler-maven-plugin][55] | [MIT License][56] | +| [Reproducible Build Maven Plugin][57] | [Apache 2.0][41] | +| [Maven Clean Plugin][58] | [The Apache Software License, Version 2.0][41] | +| [Maven Resources Plugin][59] | [The Apache Software License, Version 2.0][41] | +| [Maven Install Plugin][60] | [The Apache Software License, Version 2.0][41] | +| [Maven Deploy Plugin][61] | [The Apache Software License, Version 2.0][41] | +| [Maven Site Plugin 3][62] | [The Apache Software License, Version 2.0][41] | -[34]: https://www.eclemma.org/jacoco/index.html -[46]: http://www.apache.org/licenses/LICENSE-2.0.txt -[51]: https://maven.apache.org/surefire/maven-surefire-plugin/ -[71]: http://maven.apache.org/plugins/maven-clean-plugin/ -[7]: https://www.oracle.com/downloads/licenses/oracle-free-license.html -[14]: https://github.com/mockito/mockito -[62]: https://opensource.org/licenses/MIT -[45]: https://www.mojohaus.org/flatten-maven-plugin/ -[53]: http://www.mojohaus.org/versions-maven-plugin/ -[55]: https://github.com/exasol/project-keeper/ -[11]: http://opensource.org/licenses/BSD-3-Clause -[41]: https://maven.apache.org/plugins/maven-compiler-plugin/ -[31]: https://github.com/exasol/hamcrest-resultset-matcher/blob/main/LICENSE -[27]: https://github.com/exasol/test-db-builder-java/blob/main/LICENSE -[4]: https://github.com/exasol/error-reporting-java/ -[35]: https://www.eclipse.org/legal/epl-2.0/ -[40]: http://www.gnu.org/licenses/lgpl.txt -[67]: https://www.jacoco.org/jacoco/trunk/doc/maven.html -[21]: https://github.com/exasol/exasol-testcontainers/blob/main/LICENSE -[15]: https://github.com/mockito/mockito/blob/main/LICENSE -[49]: http://zlika.github.io/reproducible-build-maven-plugin +[0]: https://github.com/exasol/virtual-schema-common-jdbc/ +[1]: https://github.com/exasol/virtual-schema-common-jdbc/blob/main/LICENSE +[2]: https://github.com/exasol/db-fundamentals-java/ [3]: https://github.com/exasol/db-fundamentals-java/blob/main/LICENSE -[19]: http://www.opensource.org/licenses/mit-license.php -[33]: https://github.com/exasol/virtual-schema-shared-integration-tests/blob/main/LICENSE -[39]: http://sonarsource.github.io/sonar-scanner-maven/ -[28]: https://github.com/exasol/udf-debugging-java/ +[4]: https://github.com/exasol/error-reporting-java/ [5]: https://github.com/exasol/error-reporting-java/blob/main/LICENSE -[12]: https://junit.org/junit5/ -[0]: https://github.com/exasol/virtual-schema-common-jdbc/ -[36]: https://github.com/eclipse-ee4j/jsonp -[10]: http://hamcrest.org/JavaHamcrest/ -[38]: https://projects.eclipse.org/license/secondary-gpl-2.0-cp -[18]: http://www.slf4j.org -[73]: http://maven.apache.org/plugins/maven-resources-plugin/ -[61]: https://github.com/exasol/artifact-reference-checker-maven-plugin -[59]: https://maven.apache.org/plugins/maven-jar-plugin/ -[32]: https://github.com/exasol/virtual-schema-shared-integration-tests/ [6]: https://www.oracle.com/database/technologies/maven-central-guide.html -[30]: https://github.com/exasol/hamcrest-resultset-matcher/ -[26]: https://github.com/exasol/test-db-builder-java/ -[65]: https://maven.apache.org/surefire/maven-failsafe-plugin/ -[23]: http://opensource.org/licenses/MIT -[2]: https://github.com/exasol/db-fundamentals-java/ -[56]: https://github.com/exasol/project-keeper/blob/main/LICENSE -[63]: https://maven.apache.org/plugins/maven-dependency-plugin/ -[37]: https://projects.eclipse.org/license/epl-2.0 -[17]: https://www.apache.org/licenses/LICENSE-2.0.txt -[16]: https://www.jqno.nl/equalsverifier -[43]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ -[13]: https://www.eclipse.org/legal/epl-v20.html -[1]: https://github.com/exasol/virtual-schema-common-jdbc/blob/main/LICENSE -[75]: http://maven.apache.org/plugins/maven-install-plugin/ -[47]: https://sonatype.github.io/ossindex-maven/maven-plugin/ -[22]: https://testcontainers.org -[20]: https://github.com/exasol/exasol-testcontainers/ -[77]: http://maven.apache.org/plugins/maven-deploy-plugin/ -[79]: http://maven.apache.org/plugins/maven-site-plugin/ -[69]: https://github.com/exasol/error-code-crawler-maven-plugin -[29]: https://github.com/exasol/udf-debugging-java/blob/main/LICENSE -[57]: https://maven.apache.org/plugins/maven-assembly-plugin/ +[7]: https://www.oracle.com/downloads/licenses/oracle-free-license.html +[8]: http://hamcrest.org/JavaHamcrest/ +[9]: http://opensource.org/licenses/BSD-3-Clause +[10]: https://junit.org/junit5/ +[11]: https://www.eclipse.org/legal/epl-v20.html +[12]: https://github.com/mockito/mockito +[13]: https://github.com/mockito/mockito/blob/main/LICENSE +[14]: https://www.jqno.nl/equalsverifier +[15]: https://www.apache.org/licenses/LICENSE-2.0.txt +[16]: http://www.slf4j.org +[17]: http://www.opensource.org/licenses/mit-license.php +[18]: https://github.com/exasol/exasol-testcontainers/ +[19]: https://github.com/exasol/exasol-testcontainers/blob/main/LICENSE +[20]: https://java.testcontainers.org +[21]: http://opensource.org/licenses/MIT +[22]: https://github.com/exasol/test-db-builder-java/ +[23]: https://github.com/exasol/test-db-builder-java/blob/main/LICENSE +[24]: https://github.com/exasol/udf-debugging-java/ +[25]: https://github.com/exasol/udf-debugging-java/blob/main/LICENSE +[26]: https://github.com/exasol/hamcrest-resultset-matcher/ +[27]: https://github.com/exasol/hamcrest-resultset-matcher/blob/main/LICENSE +[28]: https://github.com/exasol/virtual-schema-shared-integration-tests/ +[29]: https://github.com/exasol/virtual-schema-shared-integration-tests/blob/main/LICENSE +[30]: https://www.eclemma.org/jacoco/index.html +[31]: https://www.eclipse.org/legal/epl-2.0/ +[32]: https://github.com/eclipse-ee4j/jsonp +[33]: https://projects.eclipse.org/license/epl-2.0 +[34]: https://projects.eclipse.org/license/secondary-gpl-2.0-cp +[35]: http://sonarsource.github.io/sonar-scanner-maven/ +[36]: http://www.gnu.org/licenses/lgpl.txt +[37]: https://maven.apache.org/plugins/maven-compiler-plugin/ +[38]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ +[39]: https://www.mojohaus.org/flatten-maven-plugin/ +[40]: https://sonatype.github.io/ossindex-maven/maven-plugin/ +[41]: http://www.apache.org/licenses/LICENSE-2.0.txt +[42]: https://maven.apache.org/surefire/maven-surefire-plugin/ +[43]: https://www.mojohaus.org/versions/versions-maven-plugin/ +[44]: https://basepom.github.io/duplicate-finder-maven-plugin +[45]: http://www.apache.org/licenses/LICENSE-2.0.html +[46]: https://github.com/exasol/project-keeper/ +[47]: https://github.com/exasol/project-keeper/blob/main/LICENSE +[48]: https://maven.apache.org/plugins/maven-assembly-plugin/ +[49]: https://maven.apache.org/plugins/maven-jar-plugin/ +[50]: https://github.com/exasol/artifact-reference-checker-maven-plugin/ +[51]: https://github.com/exasol/artifact-reference-checker-maven-plugin/blob/main/LICENSE +[52]: https://maven.apache.org/plugins/maven-dependency-plugin/ +[53]: https://maven.apache.org/surefire/maven-failsafe-plugin/ +[54]: https://www.jacoco.org/jacoco/trunk/doc/maven.html +[55]: https://github.com/exasol/error-code-crawler-maven-plugin/ +[56]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE +[57]: http://zlika.github.io/reproducible-build-maven-plugin +[58]: http://maven.apache.org/plugins/maven-clean-plugin/ +[59]: http://maven.apache.org/plugins/maven-resources-plugin/ +[60]: http://maven.apache.org/plugins/maven-install-plugin/ +[61]: http://maven.apache.org/plugins/maven-deploy-plugin/ +[62]: http://maven.apache.org/plugins/maven-site-plugin/ diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index 6fd14f4..a51aa88 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,5 +1,6 @@ # Changes +* [2.4.2](changes_2.4.2.md) * [2.4.1](changes_2.4.1.md) * [2.4.0](changes_2.4.0.md) * [2.3.0](changes_2.3.0.md) diff --git a/doc/changes/changes_2.4.2.md b/doc/changes/changes_2.4.2.md new file mode 100644 index 0000000..f9d263a --- /dev/null +++ b/doc/changes/changes_2.4.2.md @@ -0,0 +1,52 @@ +# Virtual Schema for Oracle 2.4.2, released 2023-10-05 + +Code name: Fix CVE-2023-42503 in test dependency + +## Summary + +This release fixes CVE-2023-42503 in test dependency `org.apache.commons:commons-compress`. + +## Security + +* #34: Fixed CVE-2023-42503 in test dependency `org.apache.commons:commons-compress` + +## Dependency Updates + +### Compile Dependency Updates + +* Updated `com.exasol:virtual-schema-common-jdbc:10.5.0` to `11.0.2` +* Updated `com.oracle.database.jdbc:ojdbc8:21.9.0.0` to `23.3.0.23.09` + +### Test Dependency Updates + +* Updated `com.exasol:exasol-testcontainers:6.5.1` to `6.6.2` +* Updated `com.exasol:hamcrest-resultset-matcher:1.5.2` to `1.6.1` +* Updated `com.exasol:test-db-builder-java:3.4.2` to `3.5.1` +* Updated `com.exasol:udf-debugging-java:0.6.8` to `0.6.11` +* Updated `com.exasol:virtual-schema-common-jdbc:10.5.0` to `11.0.2` +* Updated `com.exasol:virtual-schema-shared-integration-tests:2.2.3` to `2.2.5` +* Updated `nl.jqno.equalsverifier:equalsverifier:3.14` to `3.15.2` +* Updated `org.jacoco:org.jacoco.agent:0.8.8` to `0.8.10` +* Updated `org.junit.jupiter:junit-jupiter:5.9.2` to `5.10.0` +* Updated `org.mockito:mockito-junit-jupiter:5.2.0` to `5.5.0` +* Updated `org.slf4j:slf4j-jdk14:2.0.6` to `2.0.9` +* Updated `org.testcontainers:junit-jupiter:1.17.6` to `1.19.1` +* Updated `org.testcontainers:oracle-xe:1.17.6` to `1.19.1` + +### Plugin Dependency Updates + +* Updated `com.exasol:artifact-reference-checker-maven-plugin:0.4.0` to `0.4.2` +* Updated `com.exasol:error-code-crawler-maven-plugin:1.1.1` to `1.3.0` +* Updated `com.exasol:project-keeper-maven-plugin:2.4.6` to `2.9.12` +* Updated `io.github.zlika:reproducible-build-maven-plugin:0.15` to `0.16` +* Updated `org.apache.maven.plugins:maven-assembly-plugin:3.3.0` to `3.6.0` +* Updated `org.apache.maven.plugins:maven-compiler-plugin:3.10.1` to `3.11.0` +* Updated `org.apache.maven.plugins:maven-dependency-plugin:3.3.0` to `3.6.0` +* Updated `org.apache.maven.plugins:maven-enforcer-plugin:3.0.0` to `3.4.0` +* Updated `org.apache.maven.plugins:maven-failsafe-plugin:3.0.0-M5` to `3.1.2` +* Updated `org.apache.maven.plugins:maven-jar-plugin:3.2.2` to `3.3.0` +* Updated `org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5` to `3.1.2` +* Added `org.basepom.maven:duplicate-finder-maven-plugin:2.0.1` +* Updated `org.codehaus.mojo:flatten-maven-plugin:1.2.7` to `1.5.0` +* Updated `org.codehaus.mojo:versions-maven-plugin:2.10.0` to `2.16.0` +* Updated `org.jacoco:jacoco-maven-plugin:0.8.8` to `0.8.10` diff --git a/doc/user_guide/oracle_user_guide.md b/doc/user_guide/oracle_user_guide.md index 134c288..e3226e7 100644 --- a/doc/user_guide/oracle_user_guide.md +++ b/doc/user_guide/oracle_user_guide.md @@ -48,7 +48,7 @@ The SQL statement below creates the adapter script, defines the Java class that ```sql CREATE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS %scriptclass com.exasol.adapter.RequestDispatcher; - %jar /buckets///virtual-schema-dist-10.5.0-oracle-2.4.1.jar; + %jar /buckets///virtual-schema-dist-11.0.2-oracle-2.4.2.jar; %jar /buckets///ojdbc.jar; / ; @@ -218,6 +218,8 @@ In the following matrix you find combinations of JDBC driver and dialect version | Virtual Schema Version | Oracle Version | Driver Name | Driver Version | |------------------------|--------------------|---------------------------|----------------| -| 2.0.0 | Oracle XE 11g | ojdbc | 8 | +| 2.0.0 | Oracle XE 11g | ojdbc8 | 19.3.0.0 | | 2.0.0 | Oracle XE 11g | instantclient-basic-linux | x64-12.1.0.2.0 | +| 2.4.2 | Oracle XE 21c | ojdbc8 | 23.3.0.23.09 | +| 2.4.2 | Oracle XE 21c | instantclient-basic-linux | x64-12.1.0.2.0 | diff --git a/pk_generated_parent.pom b/pk_generated_parent.pom index 68067fb..cc12800 100644 --- a/pk_generated_parent.pom +++ b/pk_generated_parent.pom @@ -3,7 +3,7 @@ 4.0.0 com.exasol oracle-virtual-schema-generated-parent - 2.4.1 + 2.4.2 pom UTF-8 @@ -35,7 +35,7 @@ org.jacoco org.jacoco.agent - 0.8.8 + 0.8.10 test runtime @@ -50,7 +50,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + 3.11.0 ${java.version} ${java.version} @@ -59,7 +59,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0 + 3.4.0 enforce-maven @@ -69,7 +69,7 @@ - 3.6.3 + [3.8.7,3.9.0) @@ -79,7 +79,7 @@ org.codehaus.mojo flatten-maven-plugin - 1.2.7 + 1.5.0 true oss @@ -115,24 +115,10 @@ - - io.github.zlika - reproducible-build-maven-plugin - 0.15 - - - strip-jar - package - - strip-jar - - - - org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 + 3.1.2 @@ -143,7 +129,7 @@ org.codehaus.mojo versions-maven-plugin - 2.10.0 + 2.16.0 display-updates @@ -158,16 +144,46 @@ file:///${project.basedir}/versionsMavenPluginRules.xml + + org.basepom.maven + duplicate-finder-maven-plugin + 2.0.1 + + + default + verify + + check + + + + + true + true + true + true + true + true + false + true + false + + org.apache.maven.plugins maven-assembly-plugin - 3.3.0 + 3.6.0 src/assembly/all-dependencies.xml NAME_OF_YOUR_JAR false + + + true + + @@ -182,7 +198,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.2 + 3.3.0 default-jar @@ -193,7 +209,7 @@ com.exasol artifact-reference-checker-maven-plugin - 0.4.0 + 0.4.2 verify @@ -206,7 +222,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.3.0 + 3.6.0 copy-jacoco @@ -226,7 +242,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M5 + 3.1.2 @@ -249,7 +265,7 @@ org.jacoco jacoco-maven-plugin - 0.8.8 + 0.8.10 prepare-agent @@ -296,7 +312,7 @@ com.exasol error-code-crawler-maven-plugin - 1.1.1 + 1.3.0 verify @@ -306,6 +322,20 @@ + + io.github.zlika + reproducible-build-maven-plugin + 0.16 + + + strip-jar + package + + strip-jar + + + + diff --git a/pom.xml b/pom.xml index 41ab797..cd026ae 100644 --- a/pom.xml +++ b/pom.xml @@ -3,19 +3,13 @@ 4.0.0 com.exasol oracle-virtual-schema - 2.4.1 + 2.4.2 Virtual Schema for Oracle Virtual Schema for Oracle + https://github.com/exasol/oracle-virtual-schema/ - UTF-8 - UTF-8 - 11 - 3.0.0-M5 - 10.5.0 - 1.0.1 - 0.7.1 - 1.17.6 - target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml + 11.0.2 + 1.19.1 @@ -31,7 +25,7 @@ com.exasol error-reporting-java - ${error.reporting.java.version} + 1.0.1 @@ -50,32 +44,32 @@ org.junit.jupiter junit-jupiter - 5.9.2 + 5.10.0 test org.mockito mockito-junit-jupiter - 5.2.0 + 5.5.0 test nl.jqno.equalsverifier equalsverifier - 3.14 + 3.15.2 test org.slf4j slf4j-jdk14 - 2.0.6 + 2.0.9 test com.exasol exasol-testcontainers - 6.5.1 + 6.6.2 test @@ -93,30 +87,33 @@ com.oracle.database.jdbc ojdbc8 - 21.9.0.0 + 23.3.0.23.09 + + compile com.exasol test-db-builder-java - 3.4.2 + 3.5.1 test com.exasol udf-debugging-java - 0.6.8 + 0.6.11 test com.exasol hamcrest-resultset-matcher - 1.5.2 + 1.6.1 test com.exasol virtual-schema-shared-integration-tests - 2.2.3 + 2.2.5 test @@ -130,30 +127,17 @@ - - org.sonatype.ossindex.maven - ossindex-maven-plugin - - - - CVE-2022-1471 - - - org.apache.maven.plugins maven-failsafe-plugin - 0 + false com.exasol project-keeper-maven-plugin - 2.4.6 + 2.9.12 @@ -201,8 +185,7 @@ oracle-virtual-schema-generated-parent com.exasol - 2.4.1 + 2.4.2 pk_generated_parent.pom - https://github.com/exasol/oracle-virtual-schema/ 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 56c5532..dd9d21a 100644 --- a/src/main/java/com/exasol/adapter/dialects/oracle/OracleSqlDialect.java +++ b/src/main/java/com/exasol/adapter/dialects/oracle/OracleSqlDialect.java @@ -1,6 +1,5 @@ package com.exasol.adapter.dialects.oracle; -import static com.exasol.adapter.AdapterProperties.IS_LOCAL_PROPERTY; import static com.exasol.adapter.AdapterProperties.SCHEMA_NAME_PROPERTY; import static com.exasol.adapter.capabilities.AggregateFunctionCapability.*; import static com.exasol.adapter.capabilities.LiteralCapability.*; @@ -155,9 +154,7 @@ public String getStringLiteral(final String value) { * @return import type */ public ImportType getImportType() { - if (this.properties.isEnabled(IS_LOCAL_PROPERTY)) { - return ImportType.LOCAL; - } else if (this.properties.isEnabled(ORACLE_IMPORT_PROPERTY)) { + if (this.properties.isEnabled(ORACLE_IMPORT_PROPERTY)) { return ImportType.ORA; } else { return ImportType.JDBC; diff --git a/src/test/java/com/exasol/adapter/dialects/oracle/IntegrationTestConstants.java b/src/test/java/com/exasol/adapter/dialects/oracle/IntegrationTestConstants.java index 237c379..c744164 100644 --- a/src/test/java/com/exasol/adapter/dialects/oracle/IntegrationTestConstants.java +++ b/src/test/java/com/exasol/adapter/dialects/oracle/IntegrationTestConstants.java @@ -1,8 +1,7 @@ package com.exasol.adapter.dialects.oracle; public final class IntegrationTestConstants { - public static final String VIRTUAL_SCHEMAS_JAR_NAME_AND_VERSION = "virtual-schema-dist-10.5.0-oracle-2.4.1.jar"; - public static final String EXASOL_DOCKER_IMAGE_REFERENCE = "exasol/docker-db:7.0.10"; + public static final String VIRTUAL_SCHEMAS_JAR_NAME_AND_VERSION = "virtual-schema-dist-11.0.2-oracle-2.4.2.jar"; public static final String ORACLE_CONTAINER_NAME = "gvenzl/oracle-xe:21.3.0"; public static final String SCHEMA_EXASOL = "SCHEMA_EXASOL"; public static final String TABLE_JOIN_1 = "TABLE_JOIN_1"; diff --git a/src/test/java/com/exasol/adapter/dialects/oracle/OracleSqlDialectIT.java b/src/test/java/com/exasol/adapter/dialects/oracle/OracleSqlDialectIT.java index 1f21421..93a7477 100644 --- a/src/test/java/com/exasol/adapter/dialects/oracle/OracleSqlDialectIT.java +++ b/src/test/java/com/exasol/adapter/dialects/oracle/OracleSqlDialectIT.java @@ -5,6 +5,7 @@ import static com.exasol.adapter.dialects.oracle.OracleVirtualSchemaIntegrationTestSetup.createAdapterScript; import static com.exasol.adapter.dialects.oracle.OracleVirtualSchemaIntegrationTestSetup.uploadOracleJDBCDriverAndVSToBucket; import static com.exasol.matcher.ResultSetMatcher.matchesResultSet; +import static com.exasol.matcher.ResultSetStructureMatcher.table; import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; @@ -25,15 +26,13 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; import org.junit.jupiter.params.provider.ValueSource; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.testcontainers.containers.output.Slf4jLogConsumer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import com.exasol.bucketfs.Bucket; import com.exasol.bucketfs.BucketAccessException; import com.exasol.containers.ExasolContainer; +import com.exasol.containers.ExasolService; import com.exasol.dbbuilder.dialects.exasol.*; import com.exasol.udfdebugging.UdfTestSetup; import com.github.dockerjava.api.model.ContainerNetwork; @@ -41,8 +40,6 @@ @Tag("integration") @Testcontainers class OracleSqlDialectIT { - private static final Logger LOGGER = LoggerFactory.getLogger(OracleSqlDialectIT.class); - private static final String ORACLE_CONTAINER_NAME = IntegrationTestConstants.ORACLE_CONTAINER_NAME; private static final String SCHEMA_ORACLE = "SCHEMA_ORACLE"; @@ -61,9 +58,8 @@ class OracleSqlDialectIT { private static final String TABLE_ORACLE_TIMESTAMPS = "TABLE_ORACLE_TIMESTAMPS"; @Container - private static final ExasolContainer> exasolContainer = new ExasolContainer<>( - EXASOL_DOCKER_IMAGE_REFERENCE) // - .withLogConsumer(new Slf4jLogConsumer(LOGGER)); + private static final ExasolContainer> exasolContainer = new ExasolContainer<>() // + .withRequiredServices(ExasolService.BUCKETFS, ExasolService.UDF).withReuse(true); @Container private static final OracleContainerDBA oracleContainer = new OracleContainerDBA(ORACLE_CONTAINER_NAME); @@ -333,9 +329,7 @@ private Connection getExasolConnection() throws SQLException { void testCountAll() throws SQLException { final String qualifiedTableName = VIRTUAL_SCHEMA_JDBC + "." + TABLE_ORACLE_NUMBER_HANDLING; final String query = "SELECT COUNT(*) FROM " + qualifiedTableName; - final ResultSet expected = getExpectedResultSet(List.of("x DECIMAL(36,0)"), // - List.of("1")); - assertThat(getActualResultSet(query), matchesResultSet(expected)); + assertThat(getActualResultSet(query), table("BIGINT").row(1L).matches()); } @Nested @@ -622,16 +616,17 @@ void testAggregateSingleGroup(final String virtualSchemaName, final String expec void testAggregateGroupByColumnJdbc() throws SQLException { final String qualifiedActualTableName = VIRTUAL_SCHEMA_JDBC + "." + TABLE_ORACLE_ALL_DATA_TYPES; final String query = "SELECT C5, min(C7) FROM " + qualifiedActualTableName + " GROUP BY C5 ORDER BY 1 DESC"; - final ResultSet expected = getExpectedResultSet("(A VARCHAR(100), B VARCHAR(100))", - "('123456789012345678901234567890123456', '12345.12345')," // - + "('1234567890.123456789', '12355.12345')"); final ResultSet actual = statementExasol.executeQuery(query); final String expectedExplainVirtual = "SELECT TO_CHAR(\"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C5\"), CAST(MIN(\"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C7\") AS FLOAT) FROM \"" + SCHEMA_ORACLE + "\".\"" + TABLE_ORACLE_ALL_DATA_TYPES + "\" GROUP BY \"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C5\" ORDER BY \"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C5\" DESC"; - assertAll(() -> assertThat(actual, matchesResultSet(expected)), + assertAll( + () -> assertThat(actual, + table("VARCHAR", "DECIMAL") + .row("123456789012345678901234567890123456", new BigDecimal("12345.12345")) + .row("1234567890.123456789", new BigDecimal("12355.12345")).matches()), () -> assertExplainVirtual(query, expectedExplainVirtual)); } @@ -658,9 +653,6 @@ void testAggregateGroupByTuple() throws SQLException { final String qualifiedActualTableName = VIRTUAL_SCHEMA_JDBC + "." + TABLE_ORACLE_ALL_DATA_TYPES; final String query = "SELECT C_NUMBER36, C5, min(C7) FROM " + qualifiedActualTableName + " GROUP BY C_NUMBER36, C5 ORDER BY C5 DESC"; - final ResultSet expected = getExpectedResultSet("(A DECIMAL(36,0), B VARCHAR(100), C VARCHAR(100))", - "(123456789012345678901234567890123456, '123456789012345678901234567890123456', '12345.12345')," // - + "(null, '1234567890.123456789', '12355.12345')"); final ResultSet actual = statementExasol.executeQuery(query); final String expectedExplainVirtual = "SELECT \"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C_NUMBER36\", TO_CHAR(\"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C5\"), CAST(MIN(\"" @@ -668,7 +660,12 @@ void testAggregateGroupByTuple() throws SQLException { + TABLE_ORACLE_ALL_DATA_TYPES + "\" GROUP BY \"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C5\", \"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C_NUMBER36\" ORDER BY \"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C5\" DESC"; - assertAll(() -> assertThat(actual, matchesResultSet(expected)), + assertAll( + () -> assertThat(actual, + table("DECIMAL", "VARCHAR", "DECIMAL") + .row(new BigDecimal("123456789012345678901234567890123456"), + "123456789012345678901234567890123456", new BigDecimal("12345.12345")) + .row(null, "1234567890.123456789", new BigDecimal("12355.12345")).matches()), () -> assertExplainVirtual(query, expectedExplainVirtual)); } @@ -677,15 +674,15 @@ void testAggregateHaving() throws SQLException { final String qualifiedActualTableName = VIRTUAL_SCHEMA_JDBC + "." + TABLE_ORACLE_ALL_DATA_TYPES; final String query = "SELECT C5, min(C7) FROM " + qualifiedActualTableName + " GROUP BY C5 HAVING MIN(C7) > 12350"; - final ResultSet expected = getExpectedResultSet("(A VARCHAR(100), B VARCHAR(100))", - "('1234567890.123456789', '12355.12345')"); final ResultSet actual = statementExasol.executeQuery(query); final String expectedExplainVirtual = "SELECT TO_CHAR(\"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C5\"), CAST(MIN(\"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C7\") AS FLOAT) FROM \"" + SCHEMA_ORACLE + "\".\"" + TABLE_ORACLE_ALL_DATA_TYPES + "\" GROUP BY \"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C5\" HAVING 12350 < MIN(\"" + TABLE_ORACLE_ALL_DATA_TYPES + "\".\"C7\")"; - assertAll(() -> assertThat(actual, matchesResultSet(expected)), + assertAll( + () -> assertThat(actual, table("VARCHAR", "DECIMAL") + .row("1234567890.123456789", new BigDecimal("12355.12345")).matches()), () -> assertExplainVirtual(query, expectedExplainVirtual)); } 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 be68a01..9ff7726 100644 --- a/src/test/java/com/exasol/adapter/dialects/oracle/OracleSqlDialectTest.java +++ b/src/test/java/com/exasol/adapter/dialects/oracle/OracleSqlDialectTest.java @@ -96,14 +96,12 @@ void testCreateRemoteMetadataReaderConnectionFails() throws SQLException { assertThat(exception.getMessage(), containsString("E-VSORA-1")); } - @CsvSource({ "FALSE, FALSE, JDBC", // - "TRUE, FALSE, LOCAL", // - "FALSE, TRUE, ORA" }) + @CsvSource({ "FALSE, JDBC", // + "TRUE, ORA" }) @ParameterizedTest - void testGetImportTypeLocal(final String local, final String fromOracle, final String expectedImportType) { + void testGetImportTypeLocal(final String fromOracle, final String expectedImportType) { final OracleSqlDialect dialect = new OracleSqlDialect(null, - new AdapterProperties(Map.of(IS_LOCAL_PROPERTY, local, // - ORACLE_IMPORT_PROPERTY, fromOracle))); + new AdapterProperties(Map.of(ORACLE_IMPORT_PROPERTY, fromOracle))); assertThat(dialect.getImportType().toString(), equalTo(expectedImportType)); } diff --git a/src/test/java/com/exasol/adapter/dialects/oracle/OracleVirtualSchemaIntegrationTestSetup.java b/src/test/java/com/exasol/adapter/dialects/oracle/OracleVirtualSchemaIntegrationTestSetup.java index 86dc2b7..2d64447 100644 --- a/src/test/java/com/exasol/adapter/dialects/oracle/OracleVirtualSchemaIntegrationTestSetup.java +++ b/src/test/java/com/exasol/adapter/dialects/oracle/OracleVirtualSchemaIntegrationTestSetup.java @@ -27,14 +27,12 @@ public class OracleVirtualSchemaIntegrationTestSetup implements Closeable { private static final Path PATH_TO_VIRTUAL_SCHEMAS_JAR = Path.of("target", VIRTUAL_SCHEMAS_JAR_NAME_AND_VERSION); private static final String SCHEMA_EXASOL = "SCHEMA_EXASOL"; private static final String ADAPTER_SCRIPT_EXASOL = "ADAPTER_SCRIPT_EXASOL"; - private static final String EXASOL_DOCKER_IMAGE_REFERENCE = "exasol/docker-db:7.1.18"; private static final String ORACLE_CONTAINER_NAME = IntegrationTestConstants.ORACLE_CONTAINER_NAME; private final Statement oracleStatement; private final OracleContainerDBA oracleContainer = new OracleContainerDBA(ORACLE_CONTAINER_NAME); - private final ExasolContainer> exasolContainer = new ExasolContainer<>( - EXASOL_DOCKER_IMAGE_REFERENCE).withRequiredServices(ExasolService.BUCKETFS, ExasolService.UDF) - .withReuse(true); + private final ExasolContainer> exasolContainer = new ExasolContainer<>() + .withRequiredServices(ExasolService.BUCKETFS, ExasolService.UDF).withReuse(true); private final Connection exasolConnection; private final Statement exasolStatement; private final AdapterScript adapterScript; diff --git a/src/test/resources/integration/driver/oracle/settings.cfg b/src/test/resources/integration/driver/oracle/settings.cfg index 2c1216c..dd8870c 100644 --- a/src/test/resources/integration/driver/oracle/settings.cfg +++ b/src/test/resources/integration/driver/oracle/settings.cfg @@ -4,3 +4,4 @@ DRIVERMAIN=oracle.jdbc.OracleDriver PREFIX=jdbc:oracle:thin: FETCHSIZE=100000 INSERTSIZE=-1 +NOSECURITY=YES