Skip to content

Commit ee4784b

Browse files
maropusrowen
authored andcommitted
[SPARK-26499][SQL][FOLLOW-UP] Replace update with setByte for ByteType in JdbcUtils.makeGetter
### What changes were proposed in this pull request? This is a follow-up pr to fix the code coming from apache#23400; it replaces `update` with `setByte` for ByteType in `JdbcUtils.makeGetter`. ### Why are the changes needed? For better code. ### Does this PR introduce any user-facing change? No. ### How was this patch tested? Existing tests. Closes apache#26532 from maropu/SPARK-26499-FOLLOWUP. Authored-by: Takeshi Yamamuro <[email protected]> Signed-off-by: Sean Owen <[email protected]>
1 parent 4f10e54 commit ee4784b

File tree

1 file changed

+1
-1
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc

1 file changed

+1
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ object JdbcUtils extends Logging {
445445

446446
case ByteType =>
447447
(rs: ResultSet, row: InternalRow, pos: Int) =>
448-
row.update(pos, rs.getByte(pos + 1))
448+
row.setByte(pos, rs.getByte(pos + 1))
449449

450450
case StringType =>
451451
(rs: ResultSet, row: InternalRow, pos: Int) =>

0 commit comments

Comments
 (0)