title: How to parse url in spark sql(Scala)
body: <p>I am using following function to parse url but it throws error,</p>
  
  <pre><code>val b = Seq(("http://spark.apache.org/path?query=1"),("https://people.apache.org/~pwendell/spark-nightly/spark-master-docs/latest/api/sql/#negative")).toDF("url_col")
          .withColumn("host",parse_url($"url_col","HOST"))
          .withColumn("query",parse_url($"url_col","QUERY"))
          .show(false)
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>&lt;console&gt;:285: error: not found: value parse_url
                 .withColumn("host",parse_url($"url_col","HOST"))
                                    ^
  &lt;console&gt;:286: error: not found: value parse_url
                 .withColumn("query",parse_url($"url_col","QUERY"))
                                     ^
  </code></pre>
  
  <p>Kindly Guide how to parse url into its different parts.</p>