docs: document the $files and $branches system tables - #669
Open
jackylee-ch wants to merge 2 commits into
Open
Conversation
QuakeWang
reviewed
Aug 5, 2026
|
|
||
| | Column | Type | Description | | ||
| |---|---|---| | ||
| | `partition` | STRING | Partition spec for the file, or `NULL` for unpartitioned tables | |
Member
There was a problem hiding this comment.
The Rust implementation returns "{}" for unpartitioned tables, not NULL, so this description does not match the actual $files output.
Contributor
Author
There was a problem hiding this comment.
Right, format_partition returns "{}" when there are no partition fields. Fixed.
| |---|---|---| | ||
| | `partition` | STRING | Partition spec for the file, or `NULL` for unpartitioned tables | | ||
| | `bucket` | INT | Bucket id the file belongs to | | ||
| | `file_path` | STRING | Data file name | |
Member
There was a problem hiding this comment.
file_path contains the full data file path, using external_path when present, rather than only the data file name.
Contributor
Author
There was a problem hiding this comment.
Correct — it is the full path, falling back to split.data_file_path when external_path is absent. Fixed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
$filesand$branchesare registered system tables —SYSTEM_TABLE_NAMESlistsboth, and the 0.3.0 release notes already advertise
$files— but the SQLreference documented only 9 of the 11, so users had no way to learn the column
names without reading
system_tables/files.rs.$filesis the most useful of theset for debugging compaction and skew, which makes the omission the more visible
one.
Fix: add a
### $filesand a### $branchessection todocs/src/sql.md,following the existing
$tags/$table_indexesshape (purpose sentence, samplequery, column table). Column names and order are taken verbatim from
files_schema()(20 columns) andbranches_schema()(2 columns); Arrow types arerendered in the SQL spelling the surrounding sections already use. The
$branchessection also notes the one behavior that sets it apart from itsneighbours: it ignores a
$branch_<name>prefix and always reports the basetable's branches.
Docs only — no code or test changes.