After some rows are fetched, fetchall() should return remaining rows as PEP-0249 says:
https://peps.python.org/pep-0249/#fetchall
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.
Actual behavior
fetchall() returns all the rows.
Steps To Reproduce
cur = conn.cursor()
cur.execute("SELECT * FROM ( VALUES (1), (2), (3), (4), (5), (6))")
print(cur.fetchmany(2))
print(cur.fetchall()) # should return 4 rows
print(cur.fetchmany(10)) # should return no rows
Expected behavior
After some rows are fetched,
fetchall()
should return remaining rows as PEP-0249 says:Actual behavior
fetchall()
returns all the rows.Steps To Reproduce
Actual Outputs:
Expected Outputs:
Log output
No response
Operating System
Manjaro Linux
Trino Python client version
0.327.0
Trino Server version
427
Python version
3.11.5
Are you willing to submit PR?