-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Make queued and buffered rows configurable in cli #26015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -68,11 +68,15 @@ public class Query | |||||
| private final AtomicBoolean ignoreUserInterrupt = new AtomicBoolean(); | ||||||
| private final StatementClient client; | ||||||
| private final boolean debug; | ||||||
| private final int maxQueuedRows; | ||||||
| private final int maxBufferedRows; | ||||||
|
|
||||||
| public Query(StatementClient client, boolean debug) | ||||||
| public Query(StatementClient client, boolean debug, int maxQueuedRows, int maxBufferedRows) | ||||||
| { | ||||||
| this.client = requireNonNull(client, "client is null"); | ||||||
| this.debug = debug; | ||||||
| this.maxQueuedRows = maxQueuedRows; | ||||||
| this.maxBufferedRows = maxBufferedRows; | ||||||
| } | ||||||
|
|
||||||
| public Optional<String> getSetCatalog() | ||||||
|
|
@@ -263,7 +267,7 @@ else if (results.getColumns() != null && !results.getColumns().isEmpty()) { | |||||
|
|
||||||
| private void discardResults() | ||||||
| { | ||||||
| try (OutputHandler handler = new OutputHandler(new NullPrinter())) { | ||||||
| try (OutputHandler handler = new OutputHandler(new NullPrinter(), 100, 100)) { | ||||||
|
||||||
| try (OutputHandler handler = new OutputHandler(new NullPrinter(), 100, 100)) { | |
| try (OutputHandler handler = new OutputHandler(new NullPrinter(), maxQueuedRows, maxBufferedRows)) { |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -383,6 +383,8 @@ private boolean isCliSpecificOptions(String name) | |
| case "editingMode": | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, can we have a unsupported test |
||
| case "disableAutoSuggestion": | ||
| case "decimalDataSize": | ||
| case "maxBufferedRows": | ||
| case "maxQueuedRows": | ||
| return true; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -156,7 +156,9 @@ static QueryRunner createQueryRunner(TrinoUri uri, ClientSession clientSession) | |
| return new QueryRunner( | ||
| uri, | ||
| clientSession, | ||
| false); | ||
| false, | ||
| 1000, | ||
|
||
| 500); | ||
| } | ||
|
|
||
| static PrintStream nullPrintStream() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a check for those two configs? i,e at least should greater than 0.