-
Notifications
You must be signed in to change notification settings - Fork 29k
[DOC][SQL] update out-of-date code snippets using SQLContext in all documents. #14025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Test build #61646 has finished for PR 14025 at commit
|
02c4807 to
72aa185
Compare
|
Test build #61648 has finished for PR 14025 at commit
|
|
cc @liancheng |
|
@WeichenXu123 Is this ready for review? If yes, please remove the WIP tag in the PR description. |
|
@liancheng Yes. Thanks! |
docs/configuration.md
Outdated
| # sqlContext is an existing sqlContext. | ||
| properties <- sql(sqlContext, "SET -v") | ||
| # spark is an existing SparkSession. | ||
| properties <- sql(spark, "SET -v") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe in the most recent SparkR API, you don't need to pass in the spark parameter to run a SQL statement now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liancheng Fix it, thanks!
|
@tdas Would you please to help review streaming example code changes? Thanks! |
|
Test build #61713 has finished for PR 14025 at commit
|
docs/streaming-programming-guide.md
Outdated
| val sqlContext = SQLContext.getOrCreate(rdd.sparkContext) | ||
| import sqlContext.implicits._ | ||
| // Get the singleton instance of SparkSession | ||
| val spark = SparkSessionSingleton.getInstance(rdd.sparkContext.getConf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SparkSessionSingleton is only available in an example file -- i am not sure we can use it in the doc here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rxin Now I modify the doc example code using raw SparkSession API. Thanks!
|
Test build #61852 has finished for PR 14025 at commit
|
|
Thanks - merging in master/2.0. |
…ocuments. ## What changes were proposed in this pull request? I search the whole documents directory using SQLContext, and update the following places: - docs/configuration.md, sparkR code snippets. - docs/streaming-programming-guide.md, several example code. ## How was this patch tested? N/A Author: WeichenXu <WeichenXu123@outlook.com> Closes #14025 from WeichenXu123/WIP_SQLContext_update. (cherry picked from commit b131042) Signed-off-by: Reynold Xin <rxin@databricks.com>
What changes were proposed in this pull request?
I search the whole documents directory using SQLContext, and update the following places:
How was this patch tested?
N/A