File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
bindings/python/pymongoarrow Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -196,10 +196,6 @@ cdef class BuilderManager:
196196 if parent_type == BSON_TYPE_ARRAY:
197197 (< ListBuilder> self .builder_map[base_key]).append_count()
198198
199- # Update our count for top level documents.
200- if parent_type == 0 :
201- self .count += 1
202-
203199 cpdef void process_bson_stream(self , const uint8_t* bson_stream, size_t length):
204200 """ Process a bson byte stream."""
205201 cdef bson_reader_t* stream_reader = bson_reader_new_from_data(bson_stream, length)
@@ -213,6 +209,7 @@ cdef class BuilderManager:
213209 if not bson_iter_init(& doc_iter, doc):
214210 raise InvalidBSON(" Could not read BSON document" )
215211 self .parse_document(& doc_iter, b" " , 0 )
212+ self .count += 1
216213 finally :
217214 bson_reader_destroy(stream_reader)
218215
You can’t perform that action at this time.
0 commit comments