Skip to content

MINOR: [Format] Fix docstrinngs in .fbs - #50826

Open
emilk wants to merge 1 commit into
apache:mainfrom
emilk:emilk/fbs-doc-comments
Open

MINOR: [Format] Fix docstrinngs in .fbs#50826
emilk wants to merge 1 commit into
apache:mainfrom
emilk:emilk/fbs-doc-comments

Conversation

@emilk

@emilk emilk commented Aug 6, 2026

Copy link
Copy Markdown

Rationale for this change

I noticed that LZ4_FRAME lacks docs in arrow-rs and traced it back to a mistaken use of // (comment) instead of /// (docstring) in a .fbs file. I decided to fix the other suspected mistakes too.

Are these changes tested?

Generated Rust with flatc 23.5.26 before and after and diffed. The only differences are the new doc comment blocks.

Are there any user-facing changes?

Yes! There are now docstrings in the generated code :)


Disclosure per the AI-generated code guidance: I used Claude Code to find the affected comments and verify the generated-output diff. I reviewed every line.

@github-actions github-actions Bot added the awaiting review Awaiting review label Aug 6, 2026
@emilk emilk changed the title MINOR: [Format] Use /// for doc comments so they reach generated code MINOR: [Format] Use /// for doc comments Aug 6, 2026
@emilk emilk changed the title MINOR: [Format] Use /// for doc comments MINOR: [Format] Use /// for doc comments in .fbs Aug 6, 2026
@emilk
emilk force-pushed the emilk/fbs-doc-comments branch from dc73d78 to 50d2ef2 Compare August 6, 2026 13:33
@emilk emilk changed the title MINOR: [Format] Use /// for doc comments in .fbs MINOR: [Format] Fix docstrinngs in .fbs Aug 6, 2026
@emilk
emilk marked this pull request as ready for review August 6, 2026 13:33
@emilk
emilk requested a review from pitrou as a code owner August 6, 2026 13:33
Copilot AI lite review requested due to automatic review settings August 6, 2026 13:33

Copilot AI 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.

Pull request overview

This PR updates FlatBuffers schema documentation comments so flatc will propagate them into generated language bindings (by converting relevant // blocks to /// and re-associating the IntervalUnit docs with the correct declarations).

Changes:

  • Converted selected declaration-level comments from // to /// to ensure they are emitted in generated bindings.
  • Restructured IntervalUnit documentation so each paragraph attaches to the intended enum/table/value.
  • Updated schema docs for Duration and Schema.custom_metadata to use ///.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
format/Schema.fbs Converts and repositions doc comments to attach to IntervalUnit, Interval, Duration, and Schema.custom_metadata for codegen visibility.
format/Message.fbs Converts CompressionType value docs (LZ4_FRAME, ZSTD) to /// for propagation into generated bindings.
Suppressed comments (2)

format/Schema.fbs:424

  • This comment is now user-facing; "day light savings time" is usually written as "daylight saving time".
/// A "calendar" interval which models types that don't necessarily
/// have a precise duration without the context of a base timestamp (e.g.
/// days can differ in length during day light savings time transitions).

format/Schema.fbs:441

  • These lines have an extra leading space after /// (likely left over from the prior // block). Removing it will avoid odd indentation in generated docs.
///  The resolution defaults to millisecond, but can be any of the other
///  supported TimeUnit values as with Timestamp and Time types.  This type is
///  always represented as an 8-byte integer.

Comment thread format/Schema.fbs Outdated
flatc only propagates triple-slash comments into generated bindings.
Several descriptions in Message.fbs and Schema.fbs use plain // and are
therefore dropped.

Also capitalize "Arrow" in the two prose comments that spelled it
lowercase.
Copilot AI review requested due to automatic review settings August 6, 2026 16:46
@emilk
emilk force-pushed the emilk/fbs-doc-comments branch from 50d2ef2 to 547a396 Compare August 6, 2026 16:46

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Labels

awaiting review Awaiting review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants