-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Version
I am using the 1.8.4 version
Description
We want to limit the amount of RAM usage. passing a default maxRows option has no effect, the whole query is returned
How to reproduce
const operation = await this.session.executeStatement(
`WITH numbers AS (
SELECT num
FROM (SELECT EXPLODE(SEQUENCE(1, 100)) AS num) AS seq
)
SELECT num
FROM numbers
ORDER BY RAND()`,
{ maxRows: 10 },
);
const fetched = await operation.fetchAll();
console.log(fetched.length);You will notice here that fetched has a size of 100, not 10.
Workaround
The workaround is to use fetchChunk instead:
const chunk = await operation.fetchChunk({
maxRows: limit - result.length,
});Please deprecate or fix maxRows options for the executeStatement method of the session object
Metadata
Metadata
Assignees
Labels
No labels