feat(influxdb3_system_tables): expose system.tables for all databases#27270
Open
vrongmeal wants to merge 1 commit intoinfluxdata:mainfrom
Open
feat(influxdb3_system_tables): expose system.tables for all databases#27270vrongmeal wants to merge 1 commit intoinfluxdata:mainfrom
vrongmeal wants to merge 1 commit intoinfluxdata:mainfrom
Conversation
Make the `system.tables` system table available for all databases, not just the internal database. When queried from a non-internal database, the results are scoped to only the tables in that database.
Contributor
|
Thanks for your submission: @hiltontj is out for a little bit and will get back to you after returning. |
hiltontj
reviewed
Mar 18, 2026
Contributor
hiltontj
left a comment
There was a problem hiding this comment.
Hey @vrongmeal thanks for submitting a PR. The implementation looks clean and straight-forward.
At minimum, some tests are required:
- A test querying
system.tablesfrom a non-internal database and verifying results are scoped to that database only - A test querying
system.tablesfrom_internaland verifying it still returns all databases (theNonepath) - An edge case test for the error path when the database doesn't exist in the catalog (the
ok_or_elseon line57-59of the PR'stables.rs)
I think the place to write those tests would be influxdb3/tests/server/system_tables.rs.
Someone on our team will need to vet this in Enterprise to verify that there are no authz-related issues with the implementation.
| #[derive(Debug)] | ||
| pub(crate) struct TablesTable { | ||
| catalog: Arc<Catalog>, | ||
| database: Option<Arc<str>>, |
Contributor
There was a problem hiding this comment.
Pass the DatabaseSchema directly, which is already available at the callsite. This way, you don't require an additional catalog look-up.
Suggested change
| database: Option<Arc<str>>, | |
| database: Option<Arc<DatabaseSchema>>, |
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.
Closes #27205
Make the
system.tablessystem table available for all databases, not just the internal database. When queried from a non-internal database, the results are scoped to only the tables in that database.