-
Notifications
You must be signed in to change notification settings - Fork 915
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
JDBC Engine supports Oracle #6815
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6815 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 687 687
Lines 42442 42446 +4
Branches 5793 5795 +2
======================================
- Misses 42442 42446 +4 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
@@ -338,6 +338,10 @@ private Object evaluate(TTypeId columnType, Object value) { | |||
if (value instanceof String) { | |||
return ((String) value).getBytes(); | |||
} | |||
case INT_TYPE: | |||
if (value instanceof String) { | |||
return Integer.valueOf((String) value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your review, because in case of NUMBER(x,0) refering to Integer in Oracle, OJDBC returns it as java.sql.Types.NUMERIC. In this case, I implement toTTypeDesc
method of OracleSchemaHelper
to make sure NUMBER(x,0)
treated as Integer in resultSet.getMetaData
, but in evaluate
method of KyuubiBaseResultSet
, it treated java.sql.Types.NUMERIC
as decimal, which is instance of String. Is my implementation OK?
|
||
import org.apache.kyuubi.engine.jdbc.connection.JdbcConnectionProvider | ||
|
||
class OracleConnectionProvider extends JdbcConnectionProvider { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update the docs for configuration kyuubi.engine.jdbc.connection.provider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review, and I've update the docs~
tableTypes.asScala.toSet | ||
} | ||
val query = new StringBuilder( | ||
s"""SELECT OWNER AS TABLE_SCHEMA, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weired spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I've already adjusted the wired space
🔍 Description
Issue References 🔗
This pull request fixes #
Describe Your Solution 🔧
Currently, Kyuubi supports JDBC engines with limited dialects, and I extend the dialects to support Oracle.
Types of changes 🔖
Test Plan 🧪
Behavior Without This Pull Request ⚰️
Behavior With This Pull Request 🎉
Supported Oracle in JDBC engine.
Related Unit Tests
Add tests of
OperationWithOracleEngineSuite
,OracleOperationSuite
,OracleSessionSuite
andOracleStatementSuite
.Checklist 📝
Be nice. Be informative.