-
Notifications
You must be signed in to change notification settings - Fork 1
feat: use AsyncScalarUDFImpl instead of ScalarUDFImpl #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
host/src/lib.rs
Outdated
| let columnar_value: ColumnarValue = return_type.try_into()?; | ||
| match columnar_value { | ||
| ColumnarValue::Array(v) => Ok(v), | ||
| ColumnarValue::Scalar(v) => v.to_array_of_size(1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output row count should be the same as the input. The args (IIRC) should have the respective row in them, so you can use that.
0ea1970 to
854ce39
Compare
a4a79b4 to
c75705e
Compare
crepererum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last nitpick. Feel free to merge after addressing this since this PR is rather conflict-heavy.
host/tests/integration_tests/rust.rs
Outdated
|
|
||
| assert!(result.is_err()); | ||
| let error = result.unwrap_err(); | ||
| assert!(error.to_string().contains("synchronous invocation of WasmScalarUdf is not supported, use invoke_async_with_args instead")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep this in line with the remaining tests, I think this should use insta::assert_snapshot!(. This makes it easier to change the message and improves the assertion in case they actual and expected value mismatch.
4487f53 to
a7c2620
Compare
Helps #31
This adds a
AsyncScalerUDFImplimplementation forWasmScalarUDF& replaces uses ofinvoke_with_argswithinvoke_async_with_args.