title: Filter Spark Dataframe with list of values in Scala
body: <p>I am trying to create a dataframe from hive table using SparkSession like below. Once created I am filtering the rows by a list of Ids.</p>
  
  <pre><code>val myDF = spark.sql("select * from myhivetable")
  val someDF =  mfiDF.where(mfiDF("id").isin(myList:_*))
  </code></pre>
  
  <p>Instead of this approach is there a way I can query the hive table as below:</p>
  
  <pre><code>val myDF = spark.sql("select * from myhivetable").where (("id").isin(myList:_*))
  </code></pre>
  
  <p>When I try like this I am getting a compilation error.</p>
  
  <p>Could someone suggest a best approach for this. Thanks.</p>