Skip to content

Commit

Permalink
add to ci
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <[email protected]>
  • Loading branch information
wangrunji0408 committed Feb 23, 2024
1 parent 1589253 commit b6e0d80
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ arrow-ord = "50"
arrow-row = "50"
arrow-udf-js = "0.1"
arrow-udf-wasm = { version = "0.1.2", features = ["build"] }
arrow-udf-python = { git = "https://github.com/risingwavelabs/arrow-udf.git", rev = "273c8c5" }
arrow-udf-python = { git = "https://github.com/risingwavelabs/arrow-udf.git", rev = "0479980" }
arrow-array-deltalake = { package = "arrow-array", version = "48.0.1" }
arrow-buffer-deltalake = { package = "arrow-buffer", version = "48.0.1" }
arrow-cast-deltalake = { package = "arrow-cast", version = "48.0.1" }
Expand Down
12 changes: 7 additions & 5 deletions ci/scripts/run-e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,27 @@ sqllogictest -p 4566 -d test './e2e_test/database/test.slt'
echo "--- e2e, $mode, Apache Superset"
sqllogictest -p 4566 -d dev './e2e_test/superset/*.slt' --junit "batch-${profile}"

echo "--- e2e, $mode, python udf"
echo "--- e2e, $mode, external python udf"
python3 e2e_test/udf/test.py &
sleep 1
sqllogictest -p 4566 -d dev './e2e_test/udf/udf.slt'
sqllogictest -p 4566 -d dev './e2e_test/udf/external_udf.slt'
pkill python3

sqllogictest -p 4566 -d dev './e2e_test/udf/alter_function.slt'
sqllogictest -p 4566 -d dev './e2e_test/udf/graceful_shutdown_python.slt'
# FIXME: flaky test
# sqllogictest -p 4566 -d dev './e2e_test/udf/retry_python.slt'

echo "--- e2e, $mode, java udf"
echo "--- e2e, $mode, external java udf"
java -jar risingwave-udf-example.jar &
sleep 1
sqllogictest -p 4566 -d dev './e2e_test/udf/udf.slt'
sqllogictest -p 4566 -d dev './e2e_test/udf/external_udf.slt'
pkill java

echo "--- e2e, $mode, wasm udf"
echo "--- e2e, $mode, embedded udf"
sqllogictest -p 4566 -d dev './e2e_test/udf/wasm_udf.slt'
sqllogictest -p 4566 -d dev './e2e_test/udf/js_udf.slt'
sqllogictest -p 4566 -d dev './e2e_test/udf/python_udf.slt'

echo "--- Kill cluster"
cluster_stop
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/expr/core/src/expr/expr_udf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl Build for UserDefinedFunction {
UdfImpl::JavaScript(rt)
}
"python" if udf.body.is_some() => {
let mut rt = PythonRuntime::new()?;
let mut rt = PythonRuntime::builder().sandboxed(true).build()?;
let body = udf.get_body()?;
rt.add_function(
identifier,
Expand Down
2 changes: 1 addition & 1 deletion src/expr/core/src/table_function/user_defined.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ pub fn new_user_defined(prost: &PbTableFunction, chunk_size: usize) -> Result<Bo
UdfImpl::JavaScript(rt)
}
"python" if udtf.body.is_some() => {
let mut rt = PythonRuntime::new()?;
let mut rt = PythonRuntime::builder().sandboxed(true).build()?;
let body = udtf.get_body()?;
rt.add_function(
identifier,
Expand Down

0 comments on commit b6e0d80

Please sign in to comment.