mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-25 05:26:50 +00:00
@@ -108,7 +108,7 @@ pub async fn make_rustfsms(input: Arc<SelectObjectContentInput>, is_test: bool)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn make_rustfsms_with_components(
|
pub async fn make_rustfsms_with_components(
|
||||||
input: Arc<SelectObjectContentInput>,
|
input: Arc<SelectObjectContentInput>,
|
||||||
is_test: bool,
|
is_test: bool,
|
||||||
func_manager: Arc<SimpleFunctionMetadataManager>,
|
func_manager: Arc<SimpleFunctionMetadataManager>,
|
||||||
parser: Arc<DefaultParser>,
|
parser: Arc<DefaultParser>,
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ pub mod instance;
|
|||||||
pub mod metadata;
|
pub mod metadata;
|
||||||
pub mod sql;
|
pub mod sql;
|
||||||
|
|
||||||
use std::sync::{Arc, LazyLock};
|
|
||||||
use rustfs_s3select_api::{QueryResult, server::dbms::DatabaseManagerSystem};
|
use rustfs_s3select_api::{QueryResult, server::dbms::DatabaseManagerSystem};
|
||||||
use s3s::dto::SelectObjectContentInput;
|
use s3s::dto::SelectObjectContentInput;
|
||||||
|
use std::sync::{Arc, LazyLock};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
execution::{factory::SqlQueryExecutionFactory, scheduler::local::LocalScheduler},
|
execution::{factory::SqlQueryExecutionFactory, scheduler::local::LocalScheduler},
|
||||||
@@ -46,7 +46,7 @@ static GLOBAL_COMPONENTS: LazyLock<GlobalComponents> = LazyLock::new(|| {
|
|||||||
let scheduler = Arc::new(LocalScheduler {});
|
let scheduler = Arc::new(LocalScheduler {});
|
||||||
let query_execution_factory = Arc::new(SqlQueryExecutionFactory::new(optimizer, scheduler));
|
let query_execution_factory = Arc::new(SqlQueryExecutionFactory::new(optimizer, scheduler));
|
||||||
let default_table_provider = Arc::new(BaseTableProvider::default());
|
let default_table_provider = Arc::new(BaseTableProvider::default());
|
||||||
|
|
||||||
GlobalComponents {
|
GlobalComponents {
|
||||||
func_manager,
|
func_manager,
|
||||||
parser,
|
parser,
|
||||||
@@ -68,8 +68,9 @@ pub async fn get_global_db(
|
|||||||
components.parser.clone(),
|
components.parser.clone(),
|
||||||
components.query_execution_factory.clone(),
|
components.query_execution_factory.clone(),
|
||||||
components.default_table_provider.clone(),
|
components.default_table_provider.clone(),
|
||||||
).await?;
|
)
|
||||||
|
.await?;
|
||||||
|
|
||||||
Ok(Arc::new(db) as Arc<dyn DatabaseManagerSystem + Send + Sync>)
|
Ok(Arc::new(db) as Arc<dyn DatabaseManagerSystem + Send + Sync>)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user