shivsood opened a new pull request #26301: [SPARK-29644] [SQL] Corrected ShortType wrongly set as Int in JDBCUtils.scala. URL: https://github.com/apache/spark/pull/26301 ### What changes were proposed in this pull request? Fixed ShortType wrongly set as Int in JDBCUtils.scala. Added test case write/read tables from dataframe with colms as shorttype. In master in JDBCUtils.scala line number 547 has a problem where a setInt is done rather than setShort case ShortType => (stmt: PreparedStatement, row: Row, pos: Int) => stmt.setInt(pos + 1, row.getShort(pos)) The issue was pointed out by @maropu Did not seen an a reproducible issue, but this is clearly a problem that must be fixed. ### Why are the changes needed? a given type should be set using the corresponding type ### Does this PR introduce any user-facing change? No ### How was this patch tested? Added a test case in MsSqlServerIntegrationSuite.scala to write/read tables from dataframe with cols as shorttype. The fix was tested using this.
---------------------------------------------------------------- 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]
