Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Conversation

@fickludd
Copy link
Contributor

@fickludd fickludd commented Mar 29, 2019

When executing queries in autocommit mode, results are no longer materialized before printing. This was causing issues for big queries that would materialize as OOM crashes or just generally slow execution.

For --format=PLAIN this means each records is printed directly as it arrives in the shell.

For --format=VERBOSE, we cannot simply stream, because we need to know the widths of the columns before we can print even the column header. To achieve this we materialize the 1000 first rows, and compute the column widths from this sample. Any remaining rows will be streamed. If any remaining row contains a value that overflows it's column width, that value will either be wrapped to the next row (--wrap=true), or truncated (--wrap=false).

This replaces the streaming aspects of #108. I felt unsure about the maxWidth aspects, so left that out for now.

[changelog]: queries executing in auto-commit mode do no longer materialize results. For --format=VERBOSE this means that column widths are computed from the first 1000 rows (--sample-rows), and any later values that overflow their colums are either wrapped or truncated (--wrap)

When executing queries in autocommit mode, results are no longer
materialized before printing. This was causing issues for big queries
that would materialize as OOM crashes or just generally slow execution.

For --format=PLAIN this means each records is printed directly as it
arrived in the shell.

For --format=VERBOSE, we cannot simply stream, because we need to know
the widths of the columns before we can print even the column header. To
achieve this we materialize the 1000 first rows, and compute the column
widths from this sample. Any remaining rows will be streamed. If any
remaining row contains a value that overflows it's column width, that
value will either be wrapped to the next row (--wrap=true), or truncated
(--wrap=false)
...and generally clean up lot's of mocking.
@henriknyman henriknyman merged commit 3ab0ee3 into neo4j:master Apr 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants