Skip to content

Commit c07454c

Browse files
committed
refactor: pass in WasmPermissions
1 parent e4bddae commit c07454c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

host/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ impl WasmScalarUdf {
289289
};
290290
let (bindings, mut store) = link(engine, component, state)
291291
.await
292-
.context("link WASM components")?;
292+
.context("link WASM components", None)?;
293293

294294
// Populate VFS from tar archive
295295
let root_data = bindings

host/src/udf_query.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use datafusion_sql::parser::{DFParserBuilder, Statement};
88
use sqlparser::ast::{CreateFunctionBody, Expr, Statement as SqlStatement, Value};
99
use sqlparser::dialect::dialect_from_str;
1010

11-
use crate::{WasmComponentPrecompiled, WasmScalarUdf};
11+
use crate::{WasmComponentPrecompiled, WasmPermissions, WasmScalarUdf};
1212

1313
/// A [ParsedQuery] contains the extracted UDFs and SQL query string
1414
#[derive(Debug)]
@@ -48,6 +48,7 @@ impl<'a> UdfQueryParser<'a> {
4848
pub async fn parse(
4949
&self,
5050
udf_query: &str,
51+
permissions: &WasmPermissions,
5152
task_ctx: &TaskContext,
5253
) -> DataFusionResult<ParsedQuery> {
5354
let (code, sql, lang) = self.parse_inner(udf_query, task_ctx)?;
@@ -59,7 +60,7 @@ impl<'a> UdfQueryParser<'a> {
5960
))
6061
})?;
6162

62-
let udfs = WasmScalarUdf::new(component, code).await?;
63+
let udfs = WasmScalarUdf::new(component, permissions, code).await?;
6364
Ok(ParsedQuery { udfs, sql })
6465
}
6566

0 commit comments

Comments
 (0)