Skip to content

Commit ca8a1ba

Browse files
committed
rewind
1 parent 595141b commit ca8a1ba

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

hudi-spark-datasource/hudi-spark3.3.x/src/main/scala/org/apache/spark/sql/avro/AvroDeserializer.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ private[sql] class AvroDeserializer(
200200
case b: ByteBuffer =>
201201
val bytes = new Array[Byte](b.remaining)
202202
b.get(bytes)
203+
// Do not forget to reset the position
204+
b.rewind()
203205
bytes
204206
case b: Array[Byte] => b
205207
case other =>

0 commit comments

Comments
 (0)