yaooqinn commented on code in PR #46655:
URL: https://github.com/apache/spark/pull/46655#discussion_r1610873681
##########
connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/MySQLIntegrationSuite.scala:
##########
@@ -154,30 +154,43 @@ class MySQLIntegrationSuite extends
DockerJDBCIntegrationSuite {
test("SPARK-47462: Unsigned numeric types") {
val df = sqlContext.read.jdbc(jdbcUrl, "unsigned_numbers", new Properties)
val rows = df.head()
- assert(rows.get(0).isInstanceOf[Short])
- assert(rows.get(1).isInstanceOf[Integer])
- assert(rows.get(2).isInstanceOf[Integer])
- assert(rows.get(3).isInstanceOf[Long])
- assert(rows.get(4).isInstanceOf[BigDecimal])
- assert(rows.get(5).isInstanceOf[BigDecimal])
- assert(rows.get(6).isInstanceOf[Double])
- // Unlike MySQL, MariaDB seems not to distinguish signed and unsigned
tinyint(1).
val isMaria = jdbcUrl.indexOf("disableMariaDbDriver") == -1
if (isMaria) {
+ assert(rows.get(0).isInstanceOf[Integer])
+ assert(rows.get(1).isInstanceOf[Long])
+ assert(rows.get(2).isInstanceOf[Integer])
+ assert(rows.get(3).isInstanceOf[BigDecimal])
Review Comment:
> 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]