wangyum commented on a change in pull request #24969: [SPARK-28151] ByteType, 
ShortType and FloatTypes are not correctly mapped for read/write of SQLServer 
tables
URL: https://github.com/apache/spark/pull/24969#discussion_r297503561
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
 ##########
 @@ -895,6 +895,24 @@ class JDBCSuite extends QueryTest
       "BIT")
     
assert(msSqlServerDialect.getJDBCType(BinaryType).map(_.databaseTypeDefinition).get
 ==
       "VARBINARY(MAX)")
+    
assert(msSqlServerDialect.getJDBCType(ByteType).map(_.databaseTypeDefinition).get
 ==
+      "TINYINT")
+
+    
assert(msSqlServerDialect.getJDBCType(ShortType).map(_.databaseTypeDefinition).get
 ==
+      "SMALLINT")
+  }
+
+  test("MsSqlServerDialect catalyst type mapping") {
 
 Review comment:
   It is best to add tests in 
[`MsSqlServerIntegrationSuite`](https://github.com/apache/spark/blob/master/external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/MsSqlServerIntegrationSuite.scala)
 as well.

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