title: Broadcasting multiple view in SQL in pyspark
body: <p>I want to use BROADCAST hint on multiple small tables while joining with a large table. In the example below SMALLTABLE2 is joined multiple times with the LARGETABLE on different joining columns. Now to get the better performance I want both SMALLTABLE1 and SMALLTABLE2 to be BROADCASTED. Can this be achieved by simply adding the hint /* BROADCAST (B,C,D,E) */ or there is a better solution? SMALLTABLE1 &amp; SMALLTABLE2 I am getting the data by querying HIVE tables in a Dataframe and then using createOrReplaceTempView to create a view as SMALLTABLE1 &amp; SMALLTABLE2; which is later used in the query like below.</p>
  
  <p>Is there anyway BROADCASTING view created using createOrReplaceTempView function?</p>
  
  <pre><code>SELECT A.COL1, A.COL2, A.COL3, B.COL4, C.COL5, D.COL6, E.COL7
  FROM LARGETABLE A
  JOIN SMALLTABLE1 B
  ON A.LCOL = B.SCOL
  JOIN SMALLTABLE2 C
  ON A.LCOL1 = C.SCOL
  JOIN SMALLTABLE2 D
  ON A.LCOL2 = D.SCOL
  JOIN SMALLTABLE2 E
  ON A.LCOL3 = E.SCOL
  </code></pre>