shivsood 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_r298920814
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/jdbc/MsSqlServerDialect.scala
##########
@@ -39,6 +45,8 @@ private object MsSqlServerDialect extends JdbcDialect {
case StringType => Some(JdbcType("NVARCHAR(MAX)", java.sql.Types.NVARCHAR))
case BooleanType => Some(JdbcType("BIT", java.sql.Types.BIT))
case BinaryType => Some(JdbcType("VARBINARY(MAX)",
java.sql.Types.VARBINARY))
+ case ByteType => Option(JdbcType("TINYINT", java.sql.Types.TINYINT))
+ case ShortType => Option(JdbcType("SMALLINT", java.sql.Types.SMALLINT))
Review comment:
Yes, FloatType is correctly mapped to REAL in def getCommonJDBCType(dt:
DataType)
----------------------------------------------------------------
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]