Jefffrey commented on code in PR #17485:
URL: https://github.com/apache/datafusion/pull/17485#discussion_r2342731803
##########
datafusion/spark/src/function/url/mod.rs:
##########
@@ -20,15 +20,18 @@ use datafusion_functions::make_udf_function;
use std::sync::Arc;
pub mod parse_url;
+pub mod try_parse_url;
make_udf_function!(parse_url::ParseUrl, parse_url);
+make_udf_function!(try_parse_url::TryParseUrl, try_parse_url);
pub mod expr_fn {
use datafusion_functions::export_functions;
export_functions!((parse_url, "Extracts a part from a URL.", args));
+ export_functions!((try_parse_url, "This is a special version of parse_url
that performs the same operation, but returns a NULL value instead of raising
an error if the parsing cannot be performed.", args));
Review Comment:
```suggestion
export_functions!((parse_url, "Extracts a part from a URL, throwing an
error if an invalid URL is provided.", args));
export_functions!((try_parse_url, "Same as parse_url but returns NULL if
an invalid URL is provided.", args));
```
Thoughts on simplifying + clarifying wording like this?
--
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]