test(connector): Enable test class for Oracle connector
Description
This PR involves re-enabling Oracle Test Classes that were previously disabled.
Motivation and Context
Impact
Test Plan
Contributor checklist
- [ ] Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
- [ ] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
- [ ] Documented new properties (with its default value), SQL syntax, functions, or other functionality.
- [ ] If release notes are required, they follow the release notes guidelines.
- [ ] Adequate tests were added if applicable.
- [ ] CI passed.
Release Notes
Please follow release notes guidelines and fill in the release notes below.
== RELEASE NOTES ==
Oracle Connector Changes
* Update Oracle test classes to re-enable them.
Please squash all your commit into one
@namya28 what is the state of this review?
@namya28 what is the state of this review?
Hi @tdcmeehan , I've addressed the test case failures for the two test classes in this PR. However, the third test class TestOracleDistributedQueries inherits from AbstractTestDistributedQueries class and currently has over 90 test failures after running in CI tests. I’m working through them methodically, but given the volume and complexity, it may take some time to resolve them all.
To keep things clean and avoid premature reviews, I’m considering converting this PR to draft status while I continue working on the remaining test failures. Once I’ve resolved as many as possible and the test suite is in a more stable state, I’ll mark the PR as ready for review again.
Please let me know if this approach works for you, or if you’d suggest an alternative.
Thanks!
Reviewer's Guide
This PR restores disabled Oracle connector tests, adds a full distributed query test suite, enriches OracleClient with additional type mappings and SQL generation, extends the shared test framework with new helpers, and updates CI to include Oracle connector tests.
Class diagram for updated OracleClient type mappings and SQL generation
classDiagram
class OracleClient {
+Optional<ReadMapping> toPrestoType(ConnectorSession, JdbcTypeHandle)
+String toSqlType(Type)
+String normalizeIdentifier(ConnectorSession, String)
}
class ReadMapping
class ConnectorSession
class JdbcTypeHandle
class Type
class VarcharType {
+boolean isUnbounded()
+int getLengthSafe()
}
class CharType {
+int getLength()
}
class DecimalType {
+int getPrecision()
+int getScale()
}
OracleClient --> ReadMapping
OracleClient --> ConnectorSession
OracleClient --> JdbcTypeHandle
OracleClient --> Type
Type <|-- VarcharType
Type <|-- CharType
Type <|-- DecimalType
Class diagram for restored and added Oracle connector test classes
classDiagram
class TestOracleIntegrationSmokeTest {
+void testIntegration()
}
class TestOracleTypes {
+void testTypeMappings()
}
class TestOracleDistributedQueries {
+void testDistributedQueries()
}
TestOracleIntegrationSmokeTest <|-- TestOracleTypes
TestOracleIntegrationSmokeTest <|-- TestOracleDistributedQueries
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Re-enable/refactor Oracle connector integration and types test classes |
|
presto-oracle/src/test/java/com/facebook/presto/plugin/oracle/TestOracleIntegrationSmokeTest.javapresto-oracle/src/test/java/com/facebook/presto/plugin/oracle/TestOracleTypes.java |
| Introduce comprehensive Oracle distributed query tests |
|
presto-oracle/src/test/java/com/facebook/presto/plugin/oracle/TestOracleDistributedQueries.java |
| Extend OracleClient type mapping and SQL type generation |
|
presto-oracle/src/main/java/com/facebook/presto/plugin/oracle/OracleClient.java |
| Enhance shared test framework utilities |
|
presto-tests/src/main/java/com/facebook/presto/tests/AbstractTestQueryFramework.java |
| Update CI configuration for Oracle connector |
|
.github/workflows/tests.yml |
Possibly linked issues
- #[Issue ID]: The PR enables the Oracle connector tests in the CI pipeline, directly addressing the issue's goal of enabling container-based tests.
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it. - Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. You can also comment@sourcery-ai titleon the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment@sourcery-ai summaryon the pull request to (re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guideon the pull request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore. - Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment@sourcery-ai reviewto trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.