Repository navigation
Commit e440788
committed
branch-4.2: [feature](inverted index) Add index_disk_usage table function #67977
### What problem does this PR solve?
Issue Number: N/A
Related PR: #67977
Problem Summary:
Backport the index_disk_usage table function so branch-4.2 can report per-index
physical bytes and their components at tablet, rowset, or segment level.
Preserve the source feature, its limits, replica routing, cloud snapshots,
query IO accounting, and original regression and unit tests.
Use branch-4.2's GenericReader::get_next_block, direct init_reader entry,
SlotDescriptor data type accessor, and IndexDef.IndexType. Traverse rowset
segment IDs through existing paths and metadata, retaining direct footer
reads when per-segment row counts are absent. Declare the two forwarded limits with VariableMgr.VarAttr and
supply English descriptions for both language slots. Use the target schema
create_block API for the unchanged integer rowset test fixture. Load the same
VARIANT JSON fixture with the parser matching enable_variant_v2 on this branch. Keep existing TVFs,
scanner settings, and session-clone tests. The master-only storage unity
skip does not apply because this branch compiles Storage sources separately.
Source PR: #67977
### Release note
Add index_disk_usage to report the physical size and components of each index.
### Check List (For Author)
- Test: Preserve the source BE/FE unit tests and regression suite. Backport execution results are recorded in the pull request.
- Behavior changed: Yes; add the index_disk_usage table function to branch-4.2.
- Does this need documentation: Yes; tracked by the source feature PR.
Conflicts:
be/src/storage/CMakeLists.txt
be/src/storage/segment/page_decoder.h
fe/fe-core/src/main/java/org/apache/doris/catalog/BuiltinTableValuedFunctions.java
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/visitor/TableValuedFunctionVisitor.java
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
fe/fe-core/src/test/java/org/apache/doris/qe/SessionVariablesTest.java
(cherry picked from commit 3c6af92)1 parent 151738a commit e440788
30 files changed
Lines changed: 5379 additions & 14 deletions
File tree
- be
- src
- exec/scan
- format/table
- storage
- index
- inverted/snii/reader
- segment
- test
- format/table
- storage/index
- inverted/snii/reader
- fe/fe-core/src
- main/java/org/apache/doris
- catalog
- datasource/tvf/source
- nereids/trees/expressions
- functions/table
- visitor
- planner
- qe
- tablefunction
- test/java/org/apache/doris
- datasource/tvf/source
- qe
- tablefunction
- gensrc/thrift
- regression-test
- data/external_table_p0/tvf
- suites/external_table_p0/tvf
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
0 commit comments