Skip to content

Conversation

@youngsofun
Copy link
Member

@youngsofun youngsofun commented Nov 24, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

before this pr, memory_size rely on total_buffer_len, which is not changed when sliced.
after this pr memory_size is fixed so it only counts for the part it owned. sum of memory_size of a splitted block is eq to the origin memory_size.
if we do need the memory_size of the underly data buffer, we may need a new function or arg.

new impl also consider the size of reading column back from parquet. parquet use a simple bytes array without view.
the buffer of the bytes array is used directly as buffer of view

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-bugfix this PR patches a bug in codebase label Nov 24, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@youngsofun youngsofun marked this pull request as draft November 24, 2025 09:08
@youngsofun youngsofun changed the title fix: recompute total_buffer_len when slicing string view. fix: fix memory_size of sliced string view. Nov 24, 2025
@youngsofun youngsofun force-pushed the mem branch 2 times, most recently from a82c847 to ccabe90 Compare November 25, 2025 15:31
@youngsofun youngsofun force-pushed the mem branch 2 times, most recently from c894e2c to caecdd4 Compare November 25, 2025 16:25
@youngsofun youngsofun marked this pull request as ready for review November 25, 2025 17:34
@BohuTANG
Copy link
Member

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@youngsofun youngsofun merged commit 8b4a558 into databendlabs:main Nov 26, 2025
90 checks passed
youngsofun added a commit to youngsofun/databend that referenced this pull request Dec 3, 2025
BohuTANG pushed a commit that referenced this pull request Dec 3, 2025
…19051)

* Revert "fix: fix memory_size of sliced string view. (#19014)"

This reverts commit 8b4a558.

* simplify tests.

* simplify tests.

* simplify tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix this PR patches a bug in codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants