-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[SPARK-48385][SQL] Migrate the jdbc driver of mariadb from 2.x
to 3.x
#46655
Conversation
@@ -46,7 +46,7 @@ class MariaDBKrbIntegrationSuite extends DockerKrbJDBCIntegrationSuite { | |||
override val jdbcPort = 3306 | |||
|
|||
override def getJdbcUrl(ip: String, port: Int): String = | |||
s"jdbc:mysql://$ip:$port/mysql?user=$principal" | |||
s"jdbc:mysql://$ip:$port/mysql?permitMysqlScheme&user=$principal" |
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.
cc @yaooqinn |
2.x
to 3.x
2.x
to 3.x
2.x
to 3.x
shall we also update the server? https://mariadb.com/kb/en/mariadb-10-5-25-release-notes/ |
Sure, Let me verify locally first. |
https://hub.docker.com/_/mariadb/tags?page=&page_size=&ordering=&name=10.5.25 |
assert(rows.get(0).isInstanceOf[Integer]) | ||
assert(rows.get(1).isInstanceOf[Long]) | ||
assert(rows.get(2).isInstanceOf[Integer]) | ||
assert(rows.get(3).isInstanceOf[BigDecimal]) |
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.
Could you describe the root cause of this change, @panbingkun ? For me, this looks suspicious like a breaking change.
- assert(rows.get(3).isInstanceOf[Long])
+ assert(rows.get(3).isInstanceOf[BigDecimal])
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.
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.
We can also add compatible logic in MySQLDialect##getCatalystType
. Do we need to do this in this PR?
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.
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.
After - (mariadb jdbc driver: 3.4.0):
These mariadb SQL Data Type <-> JDBC Data Type mapping rules seem incorrect, do they have a statement why they made such change
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.
Let me try to find it.
IMO, it seems that the |
It's unreasonable to me. The 2.x and MySQL official both use |
Okay, I see what you mean. What you say is |
Regarding the above issues, I have proposed a PR to |
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
What changes were proposed in this pull request?
The pr aims to
mariadb
from2.x
to3.x
.mariadb
from10.5.12
to10.5.24
.Why are the changes needed?
1.First PR of Series
3.x
:https://github.com/mariadb-corporation/mariadb-connector-j/releases/tag/3.0.0-alpha
2.Seen from the Maven central repo, series
3. x
should have become the mainstream, with faster release frequencyhttps://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Was this patch authored or co-authored using generative AI tooling?
No.