hubgeter opened a new pull request, #60308: URL: https://github.com/apache/doris/pull/60308
### What problem does this PR solve?
Problem Summary:
This PR enhances the output of EXPLAIN VERBOSE for File Scan nodes by adding
the following metrics:
`dataFileNum=xxx, deleteFileNum=xxx, deleteSplitNum=xxx`
These metrics provide more visibility into the underlying file and split
layout, helping users better tune parameters and control query performance.
Details:
`dataFileNum` : The number of distinct data files that need to be read.
This is not equivalent to the number of splits, since a single data file can
be divided into multiple splits.
`deleteFileNum` : The number of distinct delete files that need to be read.
`deleteSplitNum` : Added because the relationship between data files and
delete files is many-to-many:
one data file may be associated with multiple delete files
one delete file may apply to multiple data files
Using deleteSplitNum / dataSplitNum, users can estimate the average number
of delete splits that need to be read per data split.
Example:
```
mysql> explain verbose select * from iceberg.format_v3.dv_test_1w;
+-----------------------------------------------------------------------------------------------------------------------------------------------+
| Explain String(Nereids Planner)
|
+-----------------------------------------------------------------------------------------------------------------------------------------------+
| PLAN FRAGMENT 0
|
| OUTPUT EXPRS:
|
| id[#0]
|
| grp[#1]
|
| value[#2]
|
| ts[#3]
|
| PARTITION: RANDOM
|
|
|
| HAS_COLO_PLAN_NODE: false
|
|
|
| VRESULT SINK
|
| MYSQL_PROTOCOL
|
|
|
| 0:VICEBERG_SCAN_NODE(32)
|
| table: iceberg.format_v3.dv_test_1w
|
| inputSplitNum=220, totalFileSize=720774, scanRanges=220
|
| partition=0/0
|
| backends:
|
| 1769590309070
|
|
s3://warehouse/wh/format_v3/dv_test_1w/data/00004-51-fc462f9a-d42a-404d-adfc-c8d2781c8d04-0-00001.parquet
start: 4 length: 2672 |
|
s3://warehouse/wh/format_v3/dv_test_1w/data/00003-50-fc462f9a-d42a-404d-adfc-c8d2781c8d04-0-00001.parquet
start: 4 length: 2852 |
|
s3://warehouse/wh/format_v3/dv_test_1w/data/00000-47-fc462f9a-d42a-404d-adfc-c8d2781c8d04-0-00001.parquet
start: 4 length: 2894 |
| ... other 216 files ...
|
|
s3://warehouse/wh/format_v3/dv_test_1w/data/00001-48-fc462f9a-d42a-404d-adfc-c8d2781c8d04-0-00001.parquet
start: 58397 length: 13894 |
| dataFileNum=10, deleteFileNum=1 deleteSplitNum=220
|
| cardinality=33334, numNodes=1
|
| pushdown agg=NONE
|
| tuple ids: 0
|
|
|
| Tuples:
|
| TupleDescriptor{id=0, tbl=dv_test_1w}
|
| SlotDescriptor{id=0, col=id, colUniqueId=1, type=bigint, nullable=true,
isAutoIncrement=false, subColPath=null, virtualColumn=null} |
| SlotDescriptor{id=1, col=grp, colUniqueId=2, type=int, nullable=true,
isAutoIncrement=false, subColPath=null, virtualColumn=null} |
| SlotDescriptor{id=2, col=value, colUniqueId=3, type=int, nullable=true,
isAutoIncrement=false, subColPath=null, virtualColumn=null} |
| SlotDescriptor{id=3, col=ts, colUniqueId=4, type=datetimev2(6),
nullable=true, isAutoIncrement=false, subColPath=null, virtualColumn=null} |
|
|
|
|
|
|
|
|
| ========== STATISTICS ==========
|
+-----------------------------------------------------------------------------------------------------------------------------------------------+
```
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [x] 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 <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [x] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
