What is the difference between $“Column1”, 'Column1 and “Column1” in Spark SQL?

What is the difference between $“Column1”, 'Column1 and “Column1” in Spark SQL?
val IdName = df.select('id, 'name)
val IdName = df.select($"id", $"name")
val IdName = postsDf.select("id", "name")
we are getting same results with all above query.
Is there any difference between these?
Please explain clearly in what scenario we need to implement each type of these.

Tagged:
Sign In or Register to comment.