panbingkun commented on code in PR #46655:
URL: https://github.com/apache/spark/pull/46655#discussion_r1610846422


##########
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:
   We can also add compatible logic in `MySQLDialect##getCatalystType`. Do we 
need to do this in this PR?



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to