Skip to content

Conversation

@BiteTheDDDDt
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@Thearas
Copy link
Contributor

Thearas commented Jul 14, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 100% (0/0) 🎉
Increment coverage report
Complete coverage report

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

1 similar comment
@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@BiteTheDDDDt BiteTheDDDDt changed the title test [Chore](result-sink) set ENABLE_PARALLEL_RESULT_SINK default value to true Jul 15, 2025
Copy link
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jul 15, 2025
@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.

Copy link
Contributor

@xinyiZzz xinyiZzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BiteTheDDDDt BiteTheDDDDt merged commit 5084517 into apache:master Jul 15, 2025
26 of 28 checks passed
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. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants