[Spark 2060][SQL] Querying JSON Datasets with SQL and DSL in Spark SQL

JIRA: https://issues.apache.org/jira/browse/SPARK-2060
We will use functions provided by Scala collections (e.g. map and flatMap). So, we explicitly convert the type from Java Map/Lists to Scala Map/List.