Skip to content

Commit f1702b3

Browse files
authored
ARROW-162 Remove _id from all benchmarks (#148)
1 parent ed400df commit f1702b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bindings/python/benchmarks/benchmarks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def exercise_table(table):
104104

105105
def time_conventional_ndarray(self):
106106
collection = db.benchmark
107-
cursor = collection.find()
107+
cursor = collection.find(projection={"_id": 0})
108108
dtype = self.dtypes
109109
if "Large" in type(self).__name__:
110110
np.array([tuple(doc[k] for k in self.large_doc_keys) for doc in cursor], dtype=dtype)
@@ -113,7 +113,7 @@ def time_conventional_ndarray(self):
113113

114114
def time_to_numpy(self):
115115
c = db.benchmark
116-
find_numpy_all(c, {}, schema=self.schema)
116+
find_numpy_all(c, {}, schema=self.schema, projection={"_id": 0})
117117

118118
def time_conventional_pandas(self):
119119
collection = db.benchmark
@@ -126,7 +126,7 @@ def time_to_pandas(self):
126126

127127
def time_to_arrow(self):
128128
c = db.benchmark
129-
table = find_arrow_all(c, {}, schema=self.schema)
129+
table = find_arrow_all(c, {}, schema=self.schema, projection={"_id": 0})
130130
self.exercise_table(table)
131131

132132
def time_conventional_arrow(self):

0 commit comments

Comments
 (0)