Skip to content

Conversation

@BiteTheDDDDt
Copy link
Contributor

Proposed changes

support parallel result sink

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2024

clang-tidy review says "All clean, LGTM! 👍"

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2024

clang-tidy review says "All clean, LGTM! 👍"

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2024

clang-tidy review says "All clean, LGTM! 👍"

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

Gabriel39
Gabriel39 previously approved these changes Jun 12, 2024
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 12, 2024
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Jun 12, 2024
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

Gabriel39
Gabriel39 previously approved these changes Jun 13, 2024
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 13, 2024
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Jun 13, 2024
@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 13, 2024
@BiteTheDDDDt BiteTheDDDDt merged commit 695743b into apache:master Jun 13, 2024
dataroaring pushed a commit that referenced this pull request Jun 17, 2024
## Proposed changes
support parallel result sink
Jibing-Li added a commit that referenced this pull request Jun 17, 2024
This PR changed result sink logic:
#36053
Need to change the show column stats get row batch logic to avoid NPE.
BiteTheDDDDt added a commit that referenced this pull request Jun 19, 2024
## Proposed changes
optimization for parallel result sink #36053
BiteTheDDDDt added a commit to BiteTheDDDDt/incubator-doris that referenced this pull request Jun 21, 2024
## Proposed changes
optimization for parallel result sink apache#36053
dataroaring pushed a commit that referenced this pull request Jun 21, 2024
This PR changed result sink logic:
#36053
Need to change the show column stats get row batch logic to avoid NPE.
dataroaring pushed a commit that referenced this pull request Jun 21, 2024
## Proposed changes
optimization for parallel result sink #36053
BiteTheDDDDt pushed a commit that referenced this pull request Jul 23, 2025
… and dry_run_query=true. (#53653)

Related PR: #36053 && #53209

Problem Summary:

Fixed the issue that the result of `dry_run_query=true` is wrong in
multi-be scenarios (the number of rows is less)

I think this may be related to the multi result sink introduced in pr
#36053 && #53209.
Reason:
```cpp
vmysql_result_writer.cpp
GetResultBatchCtx::on_close() {
    ...
    statistics->set_returned_rows(returned_rows);  // Set only once per result_writer.
    ...
}
```
``` java
if (connectContext != null && connectContext.getSessionVariable().dryRunQuery) {
    if (resultBatch.isEos()) {     // This will only be counted once. 
        numReceivedRows += resultBatch.getQueryStatistics().getReturnedRows();
    }
} else if (resultBatch.getBatch() != null) {
    numReceivedRows += resultBatch.getBatch().getRowsSize();
}
```
If there are multiple be, there will be multiple result sinks, and each
result sink will update its own row count at the end. Since
`resultBatch.isEos()` is only triggered once, the row count information
is less.
w41ter pushed a commit to w41ter/incubator-doris that referenced this pull request Jul 30, 2025
… and dry_run_query=true. (apache#53653)

Related PR: apache#36053 && apache#53209

Problem Summary:

Fixed the issue that the result of `dry_run_query=true` is wrong in
multi-be scenarios (the number of rows is less)

I think this may be related to the multi result sink introduced in pr
apache#36053 && apache#53209.
Reason:
```cpp
vmysql_result_writer.cpp
GetResultBatchCtx::on_close() {
    ...
    statistics->set_returned_rows(returned_rows);  // Set only once per result_writer.
    ...
}
```
``` java
if (connectContext != null && connectContext.getSessionVariable().dryRunQuery) {
    if (resultBatch.isEos()) {     // This will only be counted once. 
        numReceivedRows += resultBatch.getQueryStatistics().getReturnedRows();
    }
} else if (resultBatch.getBatch() != null) {
    numReceivedRows += resultBatch.getBatch().getRowsSize();
}
```
If there are multiple be, there will be multiple result sinks, and each
result sink will update its own row count at the end. Since
`resultBatch.isEos()` is only triggered once, the row count information
is less.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/3.0.0-merged meta-change reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants