You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/21 06:47:20 UTC

[GitHub] [spark] ScrapCodes opened a new pull request #24657: [MINOR][DOCS] Fix Spark hive example.

ScrapCodes opened a new pull request #24657: [MINOR][DOCS] Fix Spark hive example.
URL: https://github.com/apache/spark/pull/24657
 
 
   ## What changes were proposed in this pull request?
   
   Documentation has an error, https://spark.apache.org/docs/latest/sql-data-sources-hive-tables.html#hive-tables.
   
   The example:
   ```scala
   scala> val dataDir = "/tmp/parquet_data"
   dataDir: String = /tmp/parquet_data
   
   scala> spark.range(10).write.parquet(dataDir)
                                                                                   
   scala> sql(s"CREATE EXTERNAL TABLE hive_ints(key int) STORED AS PARQUET LOCATION '$dataDir'")
   res6: org.apache.spark.sql.DataFrame = []
   
   scala> sql("SELECT * FROM hive_ints").show()
   
   
   +----+
   | key|
   +----+
   |null|
   |null|
   |null|
   |null|
   |null|
   |null|
   |null|
   |null|
   |null|
   |null|
   +----+
   ```
   
   Range does not emit `key`, but `id` instead.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org