Github user OopsOutOfMemory commented on the pull request:
https://github.com/apache/spark/pull/3935#issuecomment-69056638
e.g.
```
import org.apache.spark.sql.SQLContext
val sqlContext = new SQLContext(sc)
import sqlContext._
val jsonDDL = s"""
|CREATE TEMPORARY TABLE jsonTable
|USING org.apache.spark.sql.json
|OPTIONS (
| path
'file:///Users/shengli/git_repos/spark/examples/src/main/resources/people.json'
|)""".stripMargin
sqlContext.sql(jsonDDL)
sqlContext.sql("describe jsonTable").collect()
sqlContext.sql("describe extended jsonTable").collect()
scala> sqlContext.sql("describe jsonTable").collect()
15/01/08 01:20:11 INFO sources.DDLParser: is extended ? -> false
res1: Array[org.apache.spark.sql.Row] = Array([#
col_name,data_type,comment], [age,IntegerType,null], [name,StringType,null])
scala>
scala> sqlContext.sql("describe extended jsonTable").collect()
15/01/08 01:20:14 INFO sources.DDLParser: is extended ? -> true
res2: Array[org.apache.spark.sql.Row] = Array([#
col_name,data_type,comment], [age,IntegerType,null], [name,StringType,null], [#
extended,null,null])
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]