-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Create dedicated class ResultQueryInfo for query protocol #21075
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
Merged
sopel39
merged 2 commits into
trinodb:master
from
radek-kondziolka:rk/query_info_optimization
Mar 18, 2024
Merged
Create dedicated class ResultQueryInfo for query protocol #21075
sopel39
merged 2 commits into
trinodb:master
from
radek-kondziolka:rk/query_info_optimization
Mar 18, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3b29807 to
30d906c
Compare
electrum
reviewed
Mar 14, 2024
core/trino-main/src/main/java/io/trino/server/ResultQueryInfo.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/ResultQueryInfo.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/ResultQueryInfo.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/ResultQueryInfo.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/ResultQueryInfo.java
Outdated
Show resolved
Hide resolved
30d906c to
11d20dd
Compare
sopel39
approved these changes
Mar 15, 2024
Member
sopel39
left a comment
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.
lgtm % comments
core/trino-main/src/main/java/io/trino/execution/StageStateMachine.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/BasicStageStats.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/BasicStageStats.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/BasicStageStats.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/BasicStageStats.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/BasicStageStats.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/BasicStageStats.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/StageStateMachine.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/StageStateMachine.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/StageStats.java
Outdated
Show resolved
Hide resolved
11d20dd to
8edd451
Compare
Contributor
Author
|
@sopel39 , done |
sopel39
approved these changes
Mar 15, 2024
Member
sopel39
left a comment
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.
small comment. Let's wait if @electrum has some comments
core/trino-main/src/main/java/io/trino/execution/StageStateMachine.java
Outdated
Show resolved
Hide resolved
8edd451 to
a01648f
Compare
Member
|
please rebase |
62f9d18 to
8d2f8f5
Compare
When a client (e.g. cli) fetches query result then Query#getNextResult is called. This call constructs QueryInfo every time that is a heavy operation. This commit introduces lighter query info representation ResultQueryInfo and uses it in query protocol.
8d2f8f5 to
95dafc3
Compare
Member
|
thx! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When customer fetches results then
QueryInfoobject is created (if query is not finished) for every such request.QueryInfoobject has some redundant fields that are not necessary forquery protocol.Computation of these fields in the sense of cpu and memory is expensive what we observe in our benchmarks and some users. Let's just avoid this computation.
Motivation
A lot of CPU cycles released
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
(x) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: