zeroshade commented on code in PR #833:
URL: https://github.com/apache/arrow-go/pull/833#discussion_r3876265287


##########
arrow/array/record.go:
##########
@@ -599,49 +610,73 @@ func (b *RecordBuilder) unmarshalOne(dec *json.Decoder) 
(err error) {
                return fmt.Errorf("record should start with '{', not %s", t)
        }
 
-       keylist := make(map[string]bool)
+       // consume one row checking for duplicates and nulls
+       keylist := make(map[string]json.RawMessage)

Review Comment:
   This removes the streaming path for every schema, not only schemas 
containing non-nullable fields. A 1,000-row fully nullable benchmark regressed 
from ~320 us / 345 KB / 12,091 allocs to ~1.03 ms / 3.29 MB / 49,126 allocs. 
Please retain the original streaming path when recursive nullability validation 
is unnecessary, as described in the PR, or otherwise avoid buffering and 
re-decoding every field.



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