In Spark SQL when I tried to use map function on DataFrame then I am getting below error.
The method map(Function1, ClassTag) in the type DataFrame is not applicab
Please check your input file's data and your dataframe sql query same thing I am facing and when I look back to the data so it was not matching with my query. So probably same issue you are facing. toJavaRDD and JavaRDD both are working.