Jefffrey commented on code in PR #17485:
URL: https://github.com/apache/datafusion/pull/17485#discussion_r2342798007
##########
datafusion/spark/src/function/url/parse_url.rs:
##########
@@ -47,23 +46,7 @@ impl Default for ParseUrl {
impl ParseUrl {
pub fn new() -> Self {
Self {
- signature: Signature::one_of(
- vec![
- TypeSignature::Uniform(
- 1,
- vec![DataType::Utf8View, DataType::Utf8,
DataType::LargeUtf8],
- ),
- TypeSignature::Uniform(
- 2,
- vec![DataType::Utf8View, DataType::Utf8,
DataType::LargeUtf8],
- ),
- TypeSignature::Uniform(
- 3,
- vec![DataType::Utf8View, DataType::Utf8,
DataType::LargeUtf8],
- ),
- ],
- Volatility::Immutable,
- ),
+ signature: Signature::user_defined(Volatility::Immutable),
Review Comment:
Is it possible to simplify the type signature to just be:
```rust
signature: Signature::one_of(
vec![
TypeSignature::String(1),
TypeSignature::String(2),
TypeSignature::String(3),
],
Volatility::Immutable,
),
```
So they get cast to the same string type? This would avoid the need for the
large match statement in `spark_handled_parse_url` as well.
See related comment on other PR:
https://github.com/apache/datafusion/pull/17195#discussion_r2280427776
--
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]