title: How to pass whole Row to UDF - Spark DataFrame filter
body: <p>I'm writing filter function for complex JSON dataset with lot's of inner structures. Passing individual columns is too cumbersome. </p>
  
  <p>So I declared the following UDF:</p>
  
  <pre><code>val records:DataFrame = = sqlContext.jsonFile("...")
  def myFilterFunction(r:Row):Boolean=???
  sqlc.udf.register("myFilter", (r:Row)=&gt;myFilterFunction(r))
  </code></pre>
  
  <p>Intuitively I'm thinking it will work like this:</p>
  
  <pre><code>records.filter("myFilter(*)=true")
  </code></pre>
  
  <p>What is the actual syntax?</p>