xushiyan commented on code in PR #5907:
URL: https://github.com/apache/hudi/pull/5907#discussion_r903783911


##########
hudi-spark-datasource/hudi-spark2/src/main/scala/org/apache/spark/sql/avro/AvroDeserializer.scala:
##########
@@ -146,6 +146,8 @@ class AvroDeserializer(rootAvroType: Schema, 
rootCatalystType: DataType) {
           case b: ByteBuffer =>
             val bytes = new Array[Byte](b.remaining)
             b.get(bytes)
+            // Do not forget to reset the position
+            b.rewind()

Review Comment:
   > // Do not forget to reset the position
   
   this would be a helpful note if you can add more details, or better have a 
UT cover the problem's case



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to