Skip to content

[MINOR][DOCS] Fix wrong data types in JSON Datasets example.#12290

Closed
dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
dongjoon-hyun:minor_fix_type_in_json_example
Closed

[MINOR][DOCS] Fix wrong data types in JSON Datasets example.#12290
dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
dongjoon-hyun:minor_fix_type_in_json_example

Conversation

@dongjoon-hyun
Copy link
Member

What changes were proposed in this pull request?

This PR fixes the age data types from integer to long in SQL Programming Guide: JSON Datasets.

How was this patch tested?

Manual.

@SparkQA
Copy link

SparkQA commented Apr 11, 2016

Test build #55493 has finished for PR 12290 at commit c4f6964.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Apr 11, 2016

Did you verify this is what is printed if you run the example? then that makes sense.

@dongjoon-hyun
Copy link
Member Author

Sure, I verified on master branch.

@dongjoon-hyun
Copy link
Member Author

Other examples in http://spark.apache.org/docs/latest/sql-programming-guide.html also shows long.

By the way, as you requested, I cleanly synced, built and tested this again a minute ago. I hope it helps your review.

scala> val path = "examples/src/main/resources/people.json"
path: String = examples/src/main/resources/people.json

scala> val people = sqlContext.read.json(path)
people: org.apache.spark.sql.DataFrame = [age: bigint, name: string]

scala> people.printSchema()
root
 |-- age: long (nullable = true)
 |-- name: string (nullable = true)

Thank you, @srowen .

@srowen
Copy link
Member

srowen commented Apr 11, 2016

Merged to master

@asfgit asfgit closed this in 1a0cca1 Apr 11, 2016
@dongjoon-hyun
Copy link
Member Author

Thank you for merging, @srowen .

@dongjoon-hyun dongjoon-hyun deleted the minor_fix_type_in_json_example branch April 23, 2016 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants