You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/30 00:46:53 UTC

[GitHub] [spark] shivsood edited a comment on issue #25344: [SPARK-28151][SQL] Mapped ByteType to TinyINT for MsSQLServerDialect

shivsood edited a comment on issue #25344: [SPARK-28151][SQL] Mapped ByteType to TinyINT for MsSQLServerDialect
URL: https://github.com/apache/spark/pull/25344#issuecomment-547690401
 
 
   > That should be like this? https://github.com/apache/spark/pull/25344/files#diff-391379a5ec51082e2ae1209db15c02b3R549
   > 
   > ```
   >     case ShortType =>
   >       (stmt: PreparedStatement, row: Row, pos: Int) =>
   >         stmt.setInt(pos + 1, row.getShort(pos))
   > ```
   > 
   > =>
   > 
   > ```
   >     case ShortType =>
   >       (stmt: PreparedStatement, row: Row, pos: Int) =>
   >         stmt.setShort(pos + 1, row.getShort(pos))
   > ```
   > 
   > ?
   @maropu Thanks for pointing out. From the code this looks like a problem. I dont know how to repro a failure here. Will send out a separate PR for this in some time. Do you suspect that this code should lead some corruption that's hard to repro. IMO that a short(2 bytes) will get allocated here, but this code will end up writing as a integer.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org