Jefffrey commented on code in PR #17485:
URL: https://github.com/apache/datafusion/pull/17485#discussion_r2350519469
##########
datafusion/spark/src/function/url/parse_url.rs:
##########
@@ -154,7 +151,7 @@ impl ScalarUDFImpl for ParseUrl {
);
}
match arg_types.len() {
- 2 | 3 => {
+ 2 | 3 if arg_types.iter().all(is_string_type) => {
Review Comment:
for `return_type()` function I think we can simplify to just:
```rust
fn return_type(&self, arg_types: &[DataType]) -> Result<DataType> {
Ok(arg_types[0].clone())
}
```
Since the type signature should now coerce all to a uniform string type with
the correct number of arguments
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]