title: Filtering a spark dataframe based on date
body: <p>I have a dataframe of </p>
  
  <pre><code>date, string, string
  </code></pre>
  
  <p>I want to select dates before a certain period. I have tried the following with no luck</p>
  
  <pre><code> data.filter(data("date") &lt; new java.sql.Date(format.parse("2015-03-14").getTime))
  </code></pre>
  
  <p>I'm getting an error stating the following</p>
  
  <pre><code>org.apache.spark.sql.AnalysisException: resolved attribute(s) date#75 missing from date#72,uid#73,iid#74 in operator !Filter (date#75 &lt; 16508);
  </code></pre>
  
  <p>As far as I can guess the query is incorrect. Can anyone show me what way the query should be formatted? </p>
  
  <p>I checked that all enteries in the dataframe have values - they do. </p>