Eugene-Mark commented on code in PR #36993:
URL: https://github.com/apache/spark/pull/36993#discussion_r907475109


##########
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala:
##########
@@ -924,6 +924,13 @@ class JDBCSuite extends QueryTest
     
assert(derbyDialect.getJDBCType(BooleanType).map(_.databaseTypeDefinition).get 
== "BOOLEAN")
   }
 
+  test("SPARK-39604: DerbyDialect catalyst type mapping") {
+    val derbyDialect = JdbcDialects.get("jdbc:derby:db")
+    val metadata = new MetadataBuilder().putString("name", "test_column")
+    assert(derbyDialect.getCatalystType(java.sql.Types.REAL, "real",
+      0, metadata) == Some(FloatType))

Review Comment:
   Good point about the consistency! However, currently we have MysqlDialects, 
TerdataDialects and DerbyDialects that have separated UT for `getJDBCType` and 
`getCatalystType`. It seems not bad to separate them since the two methods 
serves as different goal. 



-- 
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]

Reply via email to