You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: instance.rs
    path of file: ./repos/cnosdb/query_server/query/src
    
    the code of the file until where you have to start completion: use std::sync::Arc;

use async_trait::async_trait;
use coordinator::service::CoordinatorRef;
use derive_builder::Builder;
use memory_pool::MemoryPoolRef;
use meta::error::MetaError;
use models::auth::user::{User, UserInfo};
use models::auth::AuthError;
use models::oid::Oid;
use models::schema::DEFAULT_CATALOG;
use snafu::ResultExt;
use spi::query::auth::AccessControlRef;
use spi::query::datasource::stream::checker::StreamCheckerManager;
use spi::query::datasource::stream::StreamProviderManager;
use spi::query::dispatcher::QueryDispatcher;
use spi::query::execution::QueryStateMachineRef;
use spi::query::logical_planner::Plan;
use spi::query::session::SessionCtxFactory;
use spi::server::dbms::DatabaseManagerSystem;
use spi::service::protocol::{Query, QueryHandle, QueryId};
use spi::{AuthSnafu, Result};
use trace::{debug, SpanContext};
use tskv::kv_option::Options;

use crate::auth::auth_control::{AccessControlImpl, AccessControlNoCheck};
use crate::data_source::split::SplitManager;
use crate::data_source::stream::tskv::factory::{TskvStreamProviderFactory, TSKV_STREAM_PROVIDER};
use crate::dispatcher::manager::SimpleQueryDispatcherBuilder;
use crate::dispatcher::persister::LocalQueryPersister;
use crate::dispatcher::query_tracker::QueryTracker;
use crate::execution::factory::SqlQueryExecutionFactory;
use crate::execution::scheduler::local::LocalScheduler;
use crate::extension::expr::{load_all_functions, register_session_udfs};
use crate::extension::variable::load_all_system_vars;
use crate::function::simple_func_manager::SimpleFunctionMetadataManager;
use crate::metadata::BaseTableProvider;
use crate::sql::optimizer::CascadeOptimizerBuilder;
use crate::sql::parser::DefaultParser;
use crate::variable::simple_sys_var_manager::SimpleSystemVarManager;

pub const DEFAULT
    
    async fn test_create_external_csv_table() {
        let config = get_config_for_test();
        let opt = Options::from(&config);
        let memory = Arc::new(GreedyMemoryPool::new(1024 * 1024 * 1024));
        let db = make_cnosdbms(Arc::new(MockCoordinator::default()), opt, memory)
            .await
            .unwrap();

        assert_batches_eq!(
            ["++", "++", "++"],
            exec_sql(
                &db,
                "CREATE EXTERNAL TABLE decimal_simple (
                    c1  DECIMAL(10,6) NOT NULL,
                    c2  DOUBLE NOT NULL,
                    c3  BIGINT NOT NULL,
                    c4  BOOLEAN NOT NULL,
                    c5  DECIMAL(12,7) NOT NULL
                )
                STORED AS CSV
                WITH HEADER ROW
                LOCATION 'tests/data/csv/decimal_data.csv'",
            )
            .await
            .deref_mut()
        );

        assert_batches_eq!(
            vec![
                "+----------+----------------+-----+-------+-----------+",
                "| c1       | c2             | c3  | c4    | c5        |",
                "+----------+----------------+-----+-------+-----------+",
                "| 0.000010 | 0.000000000001 | 1   | true  | 0.0000140 |",
                "| 0.000020 | 0.000000000002 | 2   | true  | 0.0000250 |",
                "| 0.000020 | 0.000000000002 | 3   | false | 0.0000190 |",
                "| 0.000030 | 0.000000000003 | 4   | true  | 0.0000320 |",
                "| 0.000030 | 0.000000000003 | 5   | false | 0.0000350 |",
                "| 0.000030 | 0.000000000003 | 5   | true  | 0.0000110 |",
                "| 0.000040 | 0.000000000004 | 5   | true  | 0.0000440 |",
                "| 0.000040 | 0.000000000004 | 8   | false | 0.0000440 |",
                "| 0.000040 | 0.000000000004 | 12  | false | 0.0000400 |",
                "| 0.000040 | 0.000000000004 | 14  | true  | 0.0000400 |",
                "| 0.000050 | 0.000000000005 | 1   | false | 0.0001000 |",
                "| 0.000050 | 0.000000000005 | 4   | true  | 0.0000780 |",
                "| 0.000050 | 0.000000000005 | 8   | false | 0.0000330 |",
                "| 0.000050 | 0.000000000005 | 9   | true  | 0.0000520 |",
                "| 0.000050 | 0.000000000005 | 100 | true  | 0.0000680 |",
                "+----------+----------------+-----+-------+-----------+",
            ],
            exec_sql(&db, "select * from decimal_simple order by c1,c2,c3,c4,c5;",)
                .await
                .deref_mut()
        );
    }