-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[Do Not Review] - Test check #27058
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
Draft
agrawalreetika
wants to merge
6
commits into
prestodb:master
Choose a base branch
from
agrawalreetika:enableoracletestclass
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[Do Not Review] - Test check #27058
agrawalreetika
wants to merge
6
commits into
prestodb:master
from
agrawalreetika:enableoracletestclass
Conversation
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
…ntegrationSmokeTest
… OracleIntegrationSmokeTest" This reverts commit fed617c.
…s in abstract class
Contributor
Reviewer's GuideExtends the Oracle connector to support additional JDBC/Oracle types and non-legacy timestamp semantics, and wires up a full Oracle test suite (smoke, types, distributed queries) plus CI, updating core tests to allow connectors to opt out of legacy timestamp behavior. Sequence diagram for Oracle DATE/TIMESTAMP read mapping with OracleClientsequenceDiagram
participant User
participant PrestoCoordinator
participant OracleClient
participant OracleJdbcDriver
participant OracleDatabase
User->>PrestoCoordinator: submit_query SELECT date_col, ts_col FROM oracle_table
PrestoCoordinator->>OracleClient: getTableMetadata(session, table)
OracleClient->>OracleJdbcDriver: getColumns(table)
OracleJdbcDriver->>OracleDatabase: DESCRIBE oracle_table
OracleDatabase-->>OracleJdbcDriver: column metadata (DATE, TIMESTAMP)
OracleJdbcDriver-->>OracleClient: JdbcTypeHandle for DATE, TIMESTAMP
OracleClient->>OracleClient: toPrestoType(session, typeHandle)
OracleClient->>OracleClient: switch typeHandle.getJdbcType()
OracleClient-->>PrestoCoordinator: ReadMapping using timestampReadMapping for DATE and TIMESTAMP
PrestoCoordinator->>OracleJdbcDriver: executeQuery with non_legacy_timestamp_mappings
OracleJdbcDriver->>OracleDatabase: SELECT date_col, ts_col FROM oracle_table
OracleDatabase-->>OracleJdbcDriver: rows with DATE and TIMESTAMP values
OracleJdbcDriver-->>PrestoCoordinator: JDBC rows
PrestoCoordinator-->>User: result set with Presto TIMESTAMP columns
Sequence diagram for OracleClient toSqlType when creating a tablesequenceDiagram
participant User
participant PrestoCoordinator
participant OracleClient
participant OracleJdbcDriver
participant OracleDatabase
User->>PrestoCoordinator: CREATE TABLE oracle_table(a VARCHAR(2000), b DOUBLE, c TIMESTAMP)
PrestoCoordinator->>OracleClient: toSqlType(VarcharType length=2000)
OracleClient->>OracleClient: isVarcharType(type) and getLengthSafe()
OracleClient-->>PrestoCoordinator: NCLOB
PrestoCoordinator->>OracleClient: toSqlType(DOUBLE)
OracleClient-->>PrestoCoordinator: BINARY_DOUBLE
PrestoCoordinator->>OracleClient: toSqlType(TIMESTAMP)
OracleClient-->>PrestoCoordinator: TIMESTAMP
PrestoCoordinator->>OracleJdbcDriver: CREATE TABLE oracle_table(a NCLOB, b BINARY_DOUBLE, c TIMESTAMP)
OracleJdbcDriver->>OracleDatabase: execute DDL
OracleDatabase-->>OracleJdbcDriver: table created
OracleJdbcDriver-->>PrestoCoordinator: success
PrestoCoordinator-->>User: CREATE TABLE succeeded
Class diagram for updated OracleClient type mappingsclassDiagram
class OracleClient {
+Optional~ReadMapping~ toPrestoType(ConnectorSession session, JdbcTypeHandle typeHandle)
+String toSqlType(Type type)
}
class BaseJdbcClient {
+Optional~ReadMapping~ toPrestoType(ConnectorSession session, JdbcTypeHandle typeHandle)
+String toSqlType(Type type)
}
class Type
class VarcharType {
+boolean isUnbounded()
+int getLengthSafe()
}
class CharType {
+int getLength()
}
class DecimalType {
+int getPrecision()
+int getScale()
}
class ReadMapping
class ConnectorSession
class JdbcTypeHandle {
+int getJdbcType()
+int getColumnSize()
}
OracleClient --|> BaseJdbcClient
OracleClient ..> VarcharType : uses
OracleClient ..> CharType : uses
OracleClient ..> DecimalType : uses
OracleClient ..> Type : uses
OracleClient ..> ReadMapping : returns
OracleClient ..> JdbcTypeHandle : uses
OracleClient ..> ConnectorSession : uses
%% Highlight key JDBC and Presto type relationships
class JdbcTypes {
+int CLOB
+int NCLOB
+int BLOB
+int TINYINT
+int FLOAT
+int DOUBLE
+int REAL
+int NUMERIC
+int DECIMAL
+int CHAR
+int DATE
+int TIMESTAMP
+int VARCHAR
}
class OracleTypes {
+int BINARY_DOUBLE
+int BINARY_FLOAT
}
OracleClient ..> JdbcTypes : inspects
OracleClient ..> OracleTypes : inspects
class PrestoTypes {
+Type BIGINT
+Type INTEGER
+Type DOUBLE
+Type REAL
+Type BOOLEAN
+Type DATE
+Type TIMESTAMP
}
OracleClient ..> PrestoTypes : maps from
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
3aee2a6 to
53cdece
Compare
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
Motivation and Context
Impact
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.
If release note is NOT required, use:
Summary by Sourcery
Extend Oracle connector type mappings and re-enable and expand Oracle integration and distributed tests, including CI coverage.
New Features:
Enhancements:
CI:
Tests: