Skip to content

Conversation

@WeichenXu123
Copy link
Contributor

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

@SparkQA
Copy link

SparkQA commented Jul 2, 2016

Test build #61646 has finished for PR 14025 at commit 02c4807.

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

@WeichenXu123 WeichenXu123 force-pushed the WIP_SQLContext_update branch from 02c4807 to 72aa185 Compare July 2, 2016 05:01
@SparkQA
Copy link

SparkQA commented Jul 2, 2016

Test build #61648 has finished for PR 14025 at commit 72aa185.

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

@WeichenXu123
Copy link
Contributor Author

cc @liancheng

@liancheng
Copy link
Contributor

@WeichenXu123 Is this ready for review? If yes, please remove the WIP tag in the PR description.

@WeichenXu123 WeichenXu123 changed the title [WIP][DOC] update out-of-date code snippets using SQLContext in all documents. [DOC][SQL] update out-of-date code snippets using SQLContext in all documents. Jul 4, 2016
@WeichenXu123
Copy link
Contributor Author

@liancheng Yes. Thanks!

# sqlContext is an existing sqlContext.
properties <- sql(sqlContext, "SET -v")
# spark is an existing SparkSession.
properties <- sql(spark, "SET -v")
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liancheng Fix it, thanks!

@liancheng
Copy link
Contributor

@tdas Would you please to help review streaming example code changes? Thanks!

@SparkQA
Copy link

SparkQA commented Jul 4, 2016

Test build #61713 has finished for PR 14025 at commit e59fb28.

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

val sqlContext = SQLContext.getOrCreate(rdd.sparkContext)
import sqlContext.implicits._
// Get the singleton instance of SparkSession
val spark = SparkSessionSingleton.getInstance(rdd.sparkContext.getConf)
Copy link
Contributor

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.

Copy link
Contributor Author

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!

@SparkQA
Copy link

SparkQA commented Jul 6, 2016

Test build #61852 has finished for PR 14025 at commit 5d2c55f.

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

@rxin
Copy link
Contributor

rxin commented Jul 6, 2016

Thanks - merging in master/2.0.

@asfgit asfgit closed this in b131042 Jul 6, 2016
asfgit pushed a commit that referenced this pull request Jul 6, 2016
…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>
@WeichenXu123 WeichenXu123 deleted the WIP_SQLContext_update branch July 7, 2016 01:35
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.

4 participants