Repository: risingwavelabs/risingwave (language: rust)

Issue:
bug: RW panics when instantiating an embedded Python UDF for the second time
Run the following queries on `risedev p`:

```sql
create table t (a int, b int);

create function add(a int, b int) returns int language python as $$
def add(a, b):
  return a+b
$$;

create sink s as select add(a, b) as c from t with (connector = 'blackhole');
drop sink s;

create sink s as select add(a, b) as c from t with (connector = 'blackhole');
```

wwill cause:

```
/var/folders/7r/p0w75cw53gj176x6_sxj7r8m0000gn/T/fsio_zreliyrCp4.sh: line 14: 59477 Segmentation fault: 11  target/${RISEDEV_BUILD_TARGET_DIR}${BUILD_MODE_DIR}/risingwave playground $@
```

Run the following slt:

```sql
# https://github.com/risingwavelabs/risingwave/issues/17263

statement ok
create table t (a int, b int);

statement ok
create function add(a int, b int) returns int language python as $$
def add(a, b):
  return a+b
$$;

statement error function with name add\(integer,integer\) exists
create function add(int, int) returns int language sql as $$select $1 + $2$$;

statement ok
create function if not exists add(int, int) returns int language sql as $$select $1 + $2$$;

statement ok
create function add_v2(int, int) returns int language sql as $$select $1 + $2$$;

statement ok
create aggregate mysum(value int) returns int language python as $$
def create_state():
    return 0
def accumulate(state, value):
    return state + value
def finish(state):
    return state
$$;

statement error function with name mysum\(integer\) exists
create aggregate mysum(value int) returns int language python as $$
def create_state():
    return 0
def accumulate(state, value):
    return state + value
def finish(state):
    return state
$$;

statement ok
create aggregate if not exists mysum(value int) returns int language python as $$
def create_state():
    return 0
def accumulate(state, value):
    return state + value
def finish(state):
    return state
$$;

statement ok
create materialized view mv as select add(a, b) + add_v2(a, b) as c from t;

statement ok
create materialized view mv2 as select mysum(a) as s from t;

statement error function used by 1 other objects
drop function add;

statement error function used by 1 other objects
drop function if exists add;

statement error function used by 1 other objects
drop function add_v2;

statement error function used by 1 other objects
drop aggregate mysum;

statement ok
drop materialized view mv;

statement ok
drop materialized view mv2;

statement ok
drop function add;

statement error function not found
drop function add;

statement ok
drop function if exists add;

statement ok
drop function add_v2;

statement ok
drop function if exists add_v2;

statement ok
drop aggregate mysum;

statement ok
drop aggregate if exists mysum;

statement ok
create function add(a int, b int) returns int language python as $$
def add(a, b):
  return a+b
$$;

statement ok
create sink s as select add(a, b) as c from t with (connector = 'blackhole');

statement error function used by 1 other objects
drop function add;

statement ok
drop sink s;

statement ok
drop function add;

statement ok
drop table t;
```

will cause:

```
thread 'rw-streaming' panicked at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-udf-python-0.4.0/src/interpreter.rs:43:40:
called `Result::unwrap()` on an `Err` value: PyErr { type: <class 'RuntimeError'>, value: RuntimeError('unable to get sys.modules'), traceback: None }
stack backtrace:
   0: rust_begin_unwind
             at /rustc/52fd9983996d9fcfb719749838336be66dee68f9/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /rustc/52fd9983996d9fcfb719749838336be66dee68f9/library/core/src/panicking.rs:74:14
   2: core::result::unwrap_failed
             at /rustc/52fd9983996d9fcfb719749838336be66dee68f9/library/core/src/result.rs:1695:5
   3: core::result::Result<T,E>::unwrap
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/result.rs:1103:23
   4: arrow_udf_python::interpreter::SubInterpreter::new::{{closure}}
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-udf-python-0.4.0/src/interpreter.rs:43:13
   5: pyo3::marker::Python::with_gil
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.21.2/src/marker.rs:442:9
   6: arrow_udf_python::interpreter::SubInterpreter::new
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-udf-python-0.4.0/src/interpreter.rs:42:9
   7: arrow_udf_python::Builder::build
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-udf-python-0.4.0/src/lib.rs:152:27
   8: risingwave_expr_impl::udf::python::PYTHON::{{closure}}
             at ./src/expr/impl/src/udf/python.rs:33:27
   9: core::ops::function::FnOnce::call_once
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
  10: <risingwave_expr::expr::expr_udf::UserDefinedFunction as risingwave_expr::expr::build::Build>::build
             at ./src/expr/core/src/expr/expr_udf.rs:179:23
  11: <E as risingwave_expr::expr::build::BuildBoxed>::build_boxed
             at ./src/expr/core/src/expr/build.rs:172:9
  12: risingwave_expr::expr::build::ExprBuilder<R>::build_inner
             at ./src/expr/core/src/expr/build.rs:124:32
  13: risingwave_expr::expr::build::ExprBuilder<R>::build
             at ./src/expr/core/src/expr/build.rs:111:20
  14: risingwave_expr::expr::build::build_non_strict_from_prost
             at ./src/expr/core/src/expr/build.rs:48:5
  15: <risingwave_stream::from_proto::project::ProjectExecutorBuilder as risingwave_stream::from_proto::ExecutorBuilder>::new_boxed_executor::{{closure}}::{{closure}}
             at ./src/stream/src/from_proto/project.rs:37:22
  16: core::iter::adapters::map::map_try_fold::{{closure}}
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:95:28
  17: core::iter::traits::iterator::Iterator::try_fold
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:2406:21
  18: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:121:9
  19: <core::iter::adapters::GenericShunt<I,R> as core::iter::traits::iterator::Iterator>::try_fold
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rs:191:9
  20: core::iter::traits::iterator::Iterator::try_for_each
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:2468:9
  21: <core::iter::adapters::GenericShunt<I,R> as core::iter::traits::iterator::Iterator>::next
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rs:174:14
  22: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs:24:32
  23: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs:33:9
  24: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3388:9
  25: core::iter::traits::iterator::Iterator::collect
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:2001:9
  26: <core::result::Result<V,E> as core::iter::traits::collect::FromIterator<core::result::Result<A,E>>>::from_iter::{{closure}}
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/result.rs:1976:51
  27: core::iter::adapters::try_process
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rs:160:17
  28: <core::result::Result<V,E> as core::iter::traits::collect::FromIterator<core::result::Result<A,E>>>::from_iter
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/result.rs:1976:9
  29: core::iter::traits::iterator::Iterator::collect
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:2001:9
  30: itertools::Itertools::try_collect
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itertools-0.14.0/src/lib.rs:2383:9
  31: <risingwave_stream::from_proto::project::ProjectExecutorBuilder as risingwave_stream::from_proto::ExecutorBuilder>::new_boxed_executor::{{closure}}
             at ./src/stream/src/from_proto/project.rs:34:37
  32: risingwave_stream::from_proto::create_executor::{{closure}}
             at ./src/stream/src/from_proto/mod.rs:131:77
  33: risingwave_stream::task::stream_manager::<impl risingwave_stream::task::barrier_manager::StreamActorManager>::create_nodes_inner::{{closure}}
             at ./src/stream/src/task/stream_manager.rs:543:70
  34: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  35: risingwave_stream::task::stream_manager::<impl risingwave_stream::task::barrier_manager::StreamActorManager>::create_nodes_inner::{{closure}}
             at ./src/stream/src/task/stream_manager.rs:506:18
  36: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  37: risingwave_stream::task::stream_manager::<impl risingwave_stream::task::barrier_manager::StreamActorManager>::create_nodes::{{closure}}
             at ./src/stream/src/task/stream_manager.rs:596:14
  38: risingwave_stream::task::stream_manager::<impl risingwave_stream::task::barrier_manager::StreamActorManager>::create_actor::{{closure}}
             at ./src/stream/src/task/stream_manager.rs:637:18
  39: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  40: <F as futures_core::future::TryFuture>::try_poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-core-0.3.31/src/future.rs:92:9
  41: <futures_util::future::try_future::into_future::IntoFuture<Fut> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.31/src/future/try_future/into_future.rs:34:9
  42: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.31/src/future/future/map.rs:55:37
  43: <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.31/src/lib.rs:86:13
  44: <futures_util::future::try_future::MapOk<Fut,F> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.31/src/lib.rs:86:13
  45: <F as futures_core::future::TryFuture>::try_poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-core-0.3.31/src/future.rs:92:9
  46: <futures_util::future::try_future::try_flatten::TryFlatten<Fut,<Fut as futures_core::future::TryFuture>::Ok> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.31/src/future/try_future/try_flatten.rs:49:61
  47: <futures_util::future::try_future::TryFlatten<Fut1,Fut2> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.31/src/lib.rs:86:13
  48: <futures_util::future::try_future::AndThen<Fut1,Fut2,F> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.31/src/lib.rs:86:13
  49: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.31/src/future/future/map.rs:55:37
  50: <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.31/src/lib.rs:86:13
  51: <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll::{{closure}}
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/task/task_local.rs:391:31
  52: tokio::task::task_local::LocalKey<T>::scope_inner
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/task/task_local.rs:217:19
  53: <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/task/task_local.rs:387:19
  54: await_tree::root::TreeRoot::instrument::{{closure}}
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/await-tree-0.2.1/src/root.rs:43:34
  55: <futures_util::future::either::Either<A,B> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.31/src/future/either.rs:108:32
  56: core::ops::function::FnOnce::call_once
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
  57: tokio_metrics::task::instrument_poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-metrics-0.3.1/src/task.rs:2530:15
  58: <tokio_metrics::task::Instrumented<T> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-metrics-0.3.1/src/task.rs:2430:9
  59: <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll::{{closure}}
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/task/task_local.rs:391:31
  60: tokio::task::task_local::LocalKey<T>::scope_inner
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/task/task_local.rs:217:19
  61: <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/task/task_local.rs:387:19
  62: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
  63: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:331:17
  64: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/loom/std/unsafe_cell.rs:16:9
  65: tokio::runtime::task::core::Core<T,S>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:320:13
  66: tokio::runtime::task::harness::poll_future::{{closure}}
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:500:19
  67: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9
  68: std::panicking::try::do_call
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40
  69: ___rust_try
  70: std::panicking::try
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19
  71: std::panic::catch_unwind
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14
  72: tokio::runtime::task::harness::poll_future
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:488:18
  73: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:209:27
  74: tokio::runtime::task::harness::Harness<T,S>::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:154:15
  75: tokio::runtime::task::raw::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/raw.rs:271:5
  76: tokio::runtime::task::raw::RawTask::poll
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/raw.rs:201:18
  77: tokio::runtime::task::LocalNotified<S>::run
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/mod.rs:436:9
  78: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/multi_thread/worker.rs:598:13
  79: tokio::runtime::coop::with_budget
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:107:5
  80: tokio::runtime::coop::budget
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:73:5
  81: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/multi_thread/worker.rs:597:9
  82: tokio::runtime::scheduler::multi_thread::worker::Context::run
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/multi_thread/worker.rs:548:24
  83: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}}
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/multi_thread/worker.rs:513:21
  84: tokio::runtime::context::scoped::Scoped<T>::set
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/scoped.rs:40:9
  85: tokio::runtime::context::set_scheduler::{{closure}}
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:26
  86: std::thread::local::LocalKey<T>::try_with
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12
  87: std::thread::local::LocalKey<T>::with
             at /Users/richard/.rustup/toolchains/nightly-2024-10-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9
  88: tokio::runtime::context::set_scheduler
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:9
  89: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/multi_thread/worker.rs:508:9
  90: tokio::runtime::context::runtime::enter_runtime
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/runtime.rs:65:16
  91: tokio::runtime::scheduler::multi_thread::worker::run
             at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/multi_thread/worker.rs:500:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'rw-streaming

*** await tree context of current task ***

' panicked at /Users/richard/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-udf-python-0.4.0/src/interpreter.rs:43:40:
called `Result::unwrap()` on an `Err` value: PyErr { type: <class 'RuntimeError'>, value: RuntimeError('unable to get sys.modules'), traceback: None }Actor 46: `CREATE SINK s AS SELECT add(a, b) AS c FROM t WITH (connector = 'blackhole')` [3.586s]



stack backtrace:
/var/folders/7r/p0w75cw53gj176x6_sxj7r8m0000gn/T/fsio_5XViZTJty6.sh: line 14: 60305 Abort trap: 6           target/${RISEDEV_BUILD_TARGET_DIR}${BUILD_MODE_DIR}/risingwave playground $@
```


Discussion / hints:

Fix patch:
diff --git a/Cargo.lock b/Cargo.lock
index e564d37474703..60c7884b9defc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -777,8 +777,7 @@ dependencies = [
 [[package]]
 name = "arrow-udf-python"
 version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0b80da061a53aac237e711fddb01709002ba2e006f9fd4c72a430d4938dd921"
+source = "git+https://github.com/arrow-udf/arrow-udf?rev=0b185be96a37bdcd644fe40d1f0ccf0b7972a99a#0b185be96a37bdcd644fe40d1f0ccf0b7972a99a"
 dependencies = [
  "anyhow",
  "arrow-array 53.2.0",
diff --git a/Cargo.toml b/Cargo.toml
index f2116f18ffab1..04874640c3491 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -166,7 +166,7 @@ opendal = "0.49"
 arrow-flight = "53"
 arrow-udf-js = "0.5"
 arrow-udf-wasm = { version = "0.4", features = ["build"] }
-arrow-udf-python = "0.4"
+arrow-udf-python = { git = "https://github.com/arrow-udf/arrow-udf", rev = "0b185be96a37bdcd644fe40d1f0ccf0b7972a99a" }
 arrow-udf-flight = "0.4"
 clap = { version = "4", features = ["cargo", "derive", "env"] }
 # Use a forked version which removes the dependencies on dynamo db to reduce


Test patch: