Skip to content

Commit

Permalink
fix avroDeserializer for spark 32
Browse files Browse the repository at this point in the history
  • Loading branch information
wzx140 authored and CTTY committed Jul 17, 2022
1 parent 2151ba2 commit c92b5a3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ private[sql] class AvroDeserializer(rootAvroType: Schema,
case b: ByteBuffer =>
val bytes = new Array[Byte](b.remaining)
b.get(bytes)
// Do not forget to reset the position
b.rewind()
bytes
case b: Array[Byte] => b
case other =>
Expand Down

0 comments on commit c92b5a3

Please sign in to comment.