dongjoon-hyun commented on a change in pull request #23400: [SPARK-26499] [SQL] 
JdbcUtils.makeGetter does not handle ByteType
URL: https://github.com/apache/spark/pull/23400#discussion_r347704641
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
 ##########
 @@ -56,6 +56,20 @@ class JDBCSuite extends QueryTest
       Some(StringType)
   }
 
+  val testH2DialectTinyInt = new JdbcDialect {
+    override def canHandle(url: String): Boolean = url.startsWith("jdbc:h2")
+    override def getCatalystType(
+        sqlType: Int,
+        typeName: String,
+        size: Int,
+        md: MetadataBuilder): Option[DataType] = {
+      sqlType match {
+        case java.sql.Types.TINYINT => Some(ByteType)
 
 Review comment:
   I'm wondering if this is okay in this `H2` dialect context.
   We made `testH2DialectTinyInt` like this, but theoretically, `TINYINT` is 
still unsigned and Spark `ByteType` is signed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to