@@ -114,11 +114,6 @@ class Read(ABC):
114114 def setup (self ):
115115 raise NotImplementedError
116116
117- # We need this because the naive methods don't always convert nested objects.
118- @staticmethod # noqa: B027
119- def exercise_table (table ):
120- pass
121-
122117 def time_conventional_ndarray (self ):
123118 collection = db .benchmark
124119 cursor = collection .find (projection = {"_id" : 0 })
@@ -147,13 +142,11 @@ def time_to_pandas(self):
147142 def time_conventional_arrow (self ):
148143 c = db .benchmark
149144 f = list (c .find ({}, projection = {"_id" : 0 }))
150- table = pa .Table .from_pylist (f )
151- self .exercise_table (table )
145+ pa .Table .from_pylist (f )
152146
153147 def time_to_arrow (self ):
154148 c = db .benchmark
155- table = find_arrow_all (c , {}, schema = self .schema , projection = {"_id" : 0 })
156- self .exercise_table (table )
149+ find_arrow_all (c , {}, schema = self .schema , projection = {"_id" : 0 })
157150
158151 def time_conventional_polars (self ):
159152 collection = db .benchmark
@@ -211,14 +204,6 @@ def setup(self):
211204 % (N_DOCS , len (BSON .encode (base_dict )) // 1024 , len (base_dict ))
212205 )
213206
214- # We need this because the naive methods don't always convert nested objects.
215- @staticmethod
216- def exercise_table (table ):
217- [
218- [[n for n in i .values ] if isinstance (i , pa .ListScalar ) else i for i in column ]
219- for column in table .columns
220- ]
221-
222207 # All of the following tests are being skipped because NumPy/Pandas do not work with nested arrays.
223208 def time_to_numpy (self ):
224209 pass
@@ -260,14 +245,6 @@ def setup(self):
260245 % (N_DOCS , len (BSON .encode (base_dict )) // 1024 , len (base_dict ))
261246 )
262247
263- # We need this because the naive methods don't always convert nested objects.
264- @staticmethod
265- def exercise_table (table ):
266- [
267- [[n for n in i .values ()] if isinstance (i , pa .StructScalar ) else i for i in column ]
268- for column in table .columns
269- ]
270-
271248 # All of the following tests are being skipped because NumPy/Pandas do not work with nested documents.
272249 def time_to_numpy (self ):
273250 pass
0 commit comments