title: Passing data frame as optional function parameter in Scala
body: <p>Is there a way that I can pass a data frame as an optional input function parameter in Scala?
   Ex:</p>
  
  <pre><code>def test(sampleDF: DataFrame = df.sqlContext.emptyDataFrame): DataFrame = {
  
  
  }
  
  
  df.test(sampleDF)
  </code></pre>
  
  <p>Though I am passing a valid data frame here , it is always assigned to an empty data frame, how can I avoid this?</p>