influxdata / influxdata/datafusion-udf-wasm
Remove `multi_thread` flavor from tokio test
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 20
- Forks
- 3
- Avg merge
- 6h 20m
- Merged PRs (30d)
- 24
Description
# What
One of the tests we have, `test_add_one`; relies on the multi-threaded tokio test 'flavor' in order to run. This is because when we register UDFs that do *not* have an exact function signature, we must compute them every time when calling `return_type`. Which is _not_ async; we compute the UDF `return_type` asynchronously and store it for later if it is exact. `test_add_one` does not register a function with an exact signature, so we cannot compute the return type asynchronously.
To get around `return_type` being sync, we had/have a hack in place that was mostly fixed in https://github.com/influxdata/datafusion-udf-wasm/issues/31. This hack is still around though, due to effectively needing to block to compute the return type if the function signature isn't exact (mentioned above).
What we need is to completely remove the use of `flavor = multi_thread` from the tokio test.
# How
This will likely involve making changes upstream to DataFusion, this needs to be discussed further.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the `test_add_one` Tokio test and trace how non-exact UDF signatures cause `return_type` to be computed synchronously. Review the remaining workaround and the related upstream DataFusion discussion, including issue #31. Done means the test no longer uses `flavor = multi_thread` while preserving its behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- backend, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100