Skip to content

docs: Fix rendering of get_record_batch_memory_size buffer diagram - #24637

Merged
alamb merged 1 commit into
apache:mainfrom
alamb:improve_get_record_batch_memory_size_docs
Aug 25, 2026
Merged

docs: Fix rendering of get_record_batch_memory_size buffer diagram#24637
alamb merged 1 commit into
apache:mainfrom
alamb:improve_get_record_batch_memory_size_docs

Conversation

@alamb

@alamb alamb commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

The docs for get_record_batch_memory_size render poorly on docs.rs:

  1. The ASCII-art buffer diagram is not in a code block, so rustdoc collapses it into a single unreadable line
  2. A stray backtick in Current `RecordBatch`.get_array_memory_size()` will ... causes the rest of the paragraph to render as inline code

The diagram currently renders as this single line:

{xxxxxxxxxxxxxxxxxxx} <— buffer ^ ^ ^ ^ | | | | col1->{ } | | col2———>{ }
Screenshot 2026-08-24 at 3 29 49 PM

What changes are included in this PR?

  • Wrap the diagram in a text code fence so it renders as drawn
  • Replace the mis-quoted method reference with an intra-doc link to RecordBatch::get_array_memory_size

Are these changes tested?

Yes: RUSTDOCFLAGS="-D warnings" cargo doc -p datafusion-common --no-deps passes (this also verifies the new intra-doc link resolves).

Are there any user-facing changes?

Documentation only.

@github-actions github-actions Bot added the common Related to common crate label Aug 24, 2026
@alamb alamb added the documentation Improvements or additions to documentation label Aug 24, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.43%. Comparing base (26b40dd) to head (df47c1e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24637      +/-   ##
==========================================
- Coverage   81.43%   81.43%   -0.01%     
==========================================
  Files        1118     1118              
  Lines      399414   399414              
  Branches   399414   399414              
==========================================
- Hits       325278   325260      -18     
- Misses      55145    55155      +10     
- Partials    18991    18999       +8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nuno-faria nuno-faria left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good now:

Image

Comment on lines +147 to +148
/// same `Buffer`. This method provides a temporary fix until the issue is
/// resolved: <https://github.com/apache/arrow-rs/issues/6439>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if this is still needed, since the issue has been completed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That is an excellent point -- I will remove it in a follow on PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@alamb
alamb added this pull request to the merge queue Aug 25, 2026
Merged via the queue into apache:main with commit 6e66a85 Aug 25, 2026
40 checks passed
@alamb
alamb deleted the improve_get_record_batch_memory_size_docs branch August 25, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants