-
Couldn't load subscription status.
- Fork 28.9k
[SPARK-53934][CONNECT] Initial implement Connect JDBC driver #52705
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
Conversation
| case FloatType => 14 | ||
| case DoubleType => 24 |
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.
| test("get DatabaseMetaData from SparkConnectConnection") { | ||
| withConnection { conn => | ||
| val spark = conn.asInstanceOf[SparkConnectConnection].spark | ||
| val metadata = conn.getMetaData |
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.
Note: there are nearly 200 methods defined in DatabaseMetaData interface, in this Initial implementation, I only implemented some essential methods which is no ambiguity or required by BeeLine to work. The remaining methods will be implemented in subsequent PRs.
|
|
||
| package org.apache.spark.sql.connect.client.jdbc.util | ||
|
|
||
| import java.sql.{Array => _, _} |
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.
Shall we simply import Connection and ResultSet?
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.
+1, LGTM. Thank you for making a progress on this, @pan3793 .
Merged to master to unblock the remaining dependent PRs. We can revise and polish more while developing this further.
|
@dongjoon-hyun thanks for quick review and merging, subsequent PRs will be submitted soon |
What changes were proposed in this pull request?
This is the initial implementation of the Connect JDBC driver. In detail, this PR implements the essential JDBC interfaces listed below.
java.sql.Driverjava.sql.Connectionjava.sql.Statementjava.sql.ResultSetjava.sql.ResultSetMetaDatajava.sql.DatabaseMetaDataAt the first step, this PR only supports
NullType,BooleanType,ByteType,ShortType,IntegerType,LongType,FloatType,DoubleType, andStringType.Why are the changes needed?
Basically implement the feature proposed in SPIP: JDBC Driver for Spark Connect
Does this PR introduce any user-facing change?
It's a new feature.
How was this patch tested?
New UTs are added.
And I have also cross-verified BeeLine cases with SPARK-54002 (#52706)
Was this patch authored or co-authored using generative AI tooling?
No.