Github user TomaszGaweda commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22249#discussion_r213112726
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/functions.scala ---
    @@ -2459,6 +2459,26 @@ object functions {
         StringTrimLeft(e.expr, Literal(trimString))
       }
     
    +  /**
    +    * Extracts a part from a URL.
    +    *
    +    * @group string_funcs
    +    * @since 2.4.0
    +    */
    +  def parse_url(url: Column, partToExtract: String): Column = withExpr {
    --- End diff --
    
    In long term, I would suggest method that return handler for any registered 
function. So that you can write: SqlFunction something = 
spark.(...?).getFunction("parse_url"). Now `spark.udf.register` returns a 
handler for UDF, something similar for getting any kind of registered function 
may be helpful. However, it's a lot more work, so now I've just proposed to add 
this function :)


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to