hoshinojyunn opened a new pull request, #61331:
URL: https://github.com/apache/doris/pull/61331
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
The 'variant' column in the table contains data; however, when querying the
space occupied by each column in the table, the following query reveals that
the space usage for the 'variant' column consistently appears as 0:
```sql
SELECT
COLUMN_NAME,
sum(COMPRESSED_DATA_BYTES) AS compressed_data_bytes,
sum(UNCOMPRESSED_DATA_BYTES) AS uncompressed_data_bytes,
sum(RAW_DATA_BYTES) as raw_data_bytes
FROM information_schema.column_data_sizes WHERE table_id={table_id}
GROUP BY COLUMN_NAME, COLUMN_TYPE
ORDER BY compressed_data_bytes
desc;
```
Fix:
Implement three methods in `VariantDocWriter`, `UnifiedSparseColumnWriter`,
`VariantDocCompactWriter`, and `VariantColumnWriterImpl` to align with the
`ColumnWriter` interface:
```cpp
uint64_t get_raw_data_bytes() const;
uint64_t get_total_uncompressed_data_pages_bytes() const;
uint64_t get_total_compressed_data_pages_bytes() const;
```
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] 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.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] 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]