iemejia commented on code in PR #3866:
URL: https://github.com/apache/avro/pull/3866#discussion_r3567599139


##########
lang/js/lib/schemas.js:
##########
@@ -1203,6 +1259,8 @@ MapType.prototype._match = function () {
 MapType.prototype._updateResolver = function (resolver, type, opts) {
   if (type instanceof MapType) {
     resolver._values = this._values.createResolver(type._values, opts);
+    // Bound the block count using the writer's entry size (see ArrayType).
+    resolver._valuesMinBytes = 1 + getMinBytes(type._values);
     resolver._read = this._read;

Review Comment:
   Fixed — added `_itemsMinBytes` and `_valuesMinBytes` (initialized to 
undefined) to the Resolver constructor so all resolvers keep the same hidden 
class; _updateResolver now just assigns existing fields. The `!== undefined` 
fallback checks in the read paths still work.



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