Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzl25 committed Jul 22, 2024
1 parent d967d2e commit 168522d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/frontend/src/expr/table_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,14 @@ impl TableFunction {
.into());
}

if cfg!(madsim) {
return Err(crate::error::ErrorCode::BindError(
"file_scan can't be used in the madsim mode".to_string(),
)
.into());
} else {
#[cfg(madsim)]
return Err(crate::error::ErrorCode::BindError(
"file_scan can't be used in the madsim mode".to_string(),
)
.into());

#[cfg(not(madsim))]
{
static RUNTIME: LazyLock<Runtime> = LazyLock::new(|| {
tokio::runtime::Builder::new_multi_thread()
.thread_name("rw-file-scan")
Expand Down

0 comments on commit 168522d

Please sign in to comment.