title: Difference between sc.broadcast and broadcast function in spark sql
body: <p>I have used <code>sc.broadcast</code> for lookup files to improve the performance.</p>
  
  <p>I also came to know there is a function called <code>broadcast</code> in Spark SQL Functions.</p>
  
  <p>What is the difference between two?</p>
  
  <p>Which one i should use it for broadcasting the reference/look up tables?</p>