[opt](exec) skip result serialization for dry run queries#63356
Conversation
|
/review |
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
There was a problem hiding this comment.
No blocking issues found in the actual PR diff. The dry-run fast path now still evaluates output expressions, counts written rows, and skips result serialization/enqueue for both MySQL and Arrow Flight writers, which matches the stated goal and avoids the previous serialization cost. The MySQL unit test covers both normal and dry-run queue behavior; Arrow Flight has analogous logic but no dedicated test in this PR, which is a residual coverage gap rather than a blocker.\n\nCritical checkpoint conclusions: goal is clear and implemented for the touched writers; the change is small and focused. No new concurrency, lifecycle, persistence, storage-format, or dynamic-config concerns were found. Parallel writer paths were both updated. Error propagation remains unchanged around expression evaluation. Test coverage exists for the MySQL path, but Arrow Flight dry-run behavior is not directly tested. No additional user-provided focus points were supplied.
TPC-H: Total hot run time: 31404 ms |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
TPC-DS: Total hot run time: 169944 ms |
176fa8a to
cf8e0d3
Compare
|
/review |
There was a problem hiding this comment.
Review result: no blocking issues found in the live PR diff. The change keeps dry-run MySQL result writes executing output expressions while skipping serialization/enqueue, and the added unit path verifies no result batch is queued while written rows are still counted. Critical checkpoints: goal/test coverage satisfied for the dry-run skip behavior; scope is small and focused; no new concurrency, lifecycle, config, compatibility, transaction, persistence, or observability concerns identified; no parallel path requiring updates found; test coverage is targeted. User focus: no additional user-provided review focus was supplied.
|
run buildall |
TPC-H: Total hot run time: 30667 ms |
TPC-DS: Total hot run time: 169209 ms |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
What problem does this PR solve?
Issue Number: N/A
Related PR: None
Problem Summary:
When dry_run_query is enabled, FE only needs the returned row count, but BE still spends most of PhysicalResultSink time serializing MySQL result rows In a local dry-run case against numbers("number"="1000000"), the profile showed AppendBatchTime = 77.689ms, TupleConvertTime = 68.650ms, and ResultSendTime = 2.702us, which means the dry-run path was still paying almost the full result sink conversion cost.
This change keeps output expr evaluation intact, but returns early in the MySQL result writers once the output block is produced in dry-run mode. That preserves returned row accounting while skipping result serialization, block copy, and sink enqueue work that dry-run queries never consume.
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)