Migrate Oracle and MemSQL to BaseCaseInsensitiveMappingTest and some cleanups#11250
Merged
hashhar merged 4 commits intotrinodb:masterfrom Mar 3, 2022
Merged
Migrate Oracle and MemSQL to BaseCaseInsensitiveMappingTest and some cleanups#11250hashhar merged 4 commits intotrinodb:masterfrom
hashhar merged 4 commits intotrinodb:masterfrom
Conversation
hashhar
commented
Mar 1, 2022
Comment on lines
119
to
127
Member
Author
There was a problem hiding this comment.
Not the perfect solution, needed for Oracle (and maybe others in future).
Suggestions welcome.
Member
There was a problem hiding this comment.
It does the job and is simple. Good to go IMO.
losipiuk
approved these changes
Mar 1, 2022
plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseCaseInsensitiveMappingTest.java
Outdated
Show resolved
Hide resolved
This also changes some tests to not use the session schema for testing mapping rules because `getSession().getSchema()` returns the schema name as set in the session while the mapping rules require the schema name to match what actually exists in the remote database. In case of Oracle the default session schema is not quoted during creation in `TestingOracleServer#createConfigureScript` which causes it to be created in uppercase. The tests create the mapping rules with the lowercase name which causes failures. A possible solution is to inspect `DatabaseMetaData#storesUpperCaseIdentifiers` and adjust the value passed to the mapping rule accordingly but it's cumbersome to access `DatabaseMetaData` from the test so instead we opt to run these tests in new schemas which would get created with correct case.
Member
Author
|
CI hit #11130 |
This was referenced Mar 15, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Some test cleanups.
Documentation
(x) No documentation is needed.
Release notes
(x) No release notes entries required.