Hi Pinot team, I have a question about the impleme...
# general
r
Hi Pinot team, I have a question about the implementation of the Python client The method
Cursor.fetchall
has the following docstring :
Fetch all (remaining) rows of a query result, returning them as a
sequence of sequences (e.g. a list of tuples). Note that the cursor's
arraysize attribute can affect the performance of this operation.
However, the method's implementation is simply :
Copy code
return list(self)
which basically creates a list by calling
fetchone
, i.e.
self._results.pop(0)
once for each element of the list
self._results
. I wonder if there is a reason for this, instead of something like :
Copy code
res = self._results
self._results = []
return res
My main concern is about possible performance issues when the query result contains many rows
r
improvements with solid justifications like this (and benchmarks) are always welcome
👍 1
r
If you need benchmarks before approving the PR, I can produce some by the end of the week
m
Thanks @Rostan TABET for your contribution, much appreciated