during the learning of Spark 2 in Scala, I found that we can use two ways to query data in SparkSQL:
- spark.sql(SQL_STATEMENT) // variable "spark" is an instance of SparkSession
- DataSet/DataFrame.select/.where/.groupBy....
My question is what are the differences(functional, performance, etc.) bewtween the them? I tried to find the anwser on internet or their documentation, but failed, so I would like to listen to your opinions