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

JIRA: https://issues.apache.org/jira/browse/SPARK-2060

Programming guide: http://yhuai.github.io/site/sql-programming-guide.html

Scala doc of SQLContext: http://yhuai.github.io/site/api/scala/index.html#org.apache.spark.sql.SQLContext
add a more meaningful exception message, i.e.
```
require(samplingRatio > 0, s"samplingRatio ($samplingRatio) should be greater than 0")
```