You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/06/20 06:22:40 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #5907: [HUDI-4285] add ByteBuffer#rewind after ByteBuffer#get in AvroDeseria…

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


##########
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:
   The clazz is copied from spark, does spark have the same fix ?



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org