Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/10083#discussion_r46451156
--- Diff:
core/src/main/scala/org/apache/spark/serializer/GenericAvroSerializer.scala ---
@@ -81,7 +81,10 @@ private[serializer] class GenericAvroSerializer(schemas:
Map[Long, String])
* seen values so to limit the number of times that decompression has to
be done.
*/
def decompress(schemaBytes: ByteBuffer): Schema =
decompressCache.getOrElseUpdate(schemaBytes, {
- val bis = new ByteArrayInputStream(schemaBytes.array())
+ val bis = new ByteArrayInputStream(
--- End diff --
Because `decompressCache` puts `ByteBuffer` as a key, here should not
change the `schemaBytes`'s `position`, so cannot use `ByteBufferInputStream`
here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]