-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: changes needed for IDs in pro (#25479)
* refactor: roll back addition of DatabaseSchemaProvider trait * refactor: make parquet metrics optional in telemetry for pro * refactor: make ParquetFileId Hash * refactor: test harness logging
- Loading branch information
Showing
15 changed files
with
104 additions
and
144 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,2 @@ | ||
use std::sync::Arc; | ||
|
||
use catalog::DatabaseSchema; | ||
use influxdb3_id::DbId; | ||
|
||
pub mod catalog; | ||
pub(crate) mod serialize; | ||
|
||
/// Provide [`DatabaseSchema`] and there derivatives where needed. | ||
/// | ||
/// This trait captures the read-only behaviour of the [`catalog::Catalog`] as where it is used to | ||
/// serve queries and provide schema-related info of the underlying database. | ||
pub trait DatabaseSchemaProvider: std::fmt::Debug + Send + Sync + 'static { | ||
/// Convert a database name to its corresponding [`DbId`] | ||
fn db_name_to_id(&self, db_name: &str) -> Option<DbId>; | ||
|
||
/// Convert a [`DbId`] into its corresponding database name | ||
fn db_id_to_name(&self, db_id: DbId) -> Option<Arc<str>>; | ||
|
||
/// Get the [`DatabaseSchema`] for the given name, or `None` otherwise | ||
fn db_schema(&self, db_name: &str) -> Option<Arc<DatabaseSchema>>; | ||
|
||
/// Get the [`DatabaseSchema`] for the given [`DbId`], or `None` otherwise | ||
fn db_schema_by_id(&self, db_id: DbId) -> Option<Arc<DatabaseSchema>>; | ||
|
||
/// Get the [`DatabaseSchema`] as well as the corresponding [`DbId`] for the given name | ||
fn db_schema_and_id(&self, db_name: &str) -> Option<(DbId, Arc<DatabaseSchema>)>; | ||
|
||
/// Get a list of the database names in the underlying catalog'd instance | ||
fn db_names(&self) -> Vec<String>; | ||
|
||
/// List out all [`DatabaseSchema`] in the database | ||
fn list_db_schema(&self) -> Vec<Arc<DatabaseSchema>>; | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.