Skip to content

Conversation

@sameeragarwal
Copy link
Member

What changes were proposed in this pull request?

This patch adds support for customizing the spark session by injecting user-defined custom extensions. This allows a user to add custom analyzer rules/checks, optimizer rules, planning strategies or even a customized parser.

How was this patch tested?

Unit Tests in SparkSessionExtensionSuite

@sameeragarwal
Copy link
Member Author

cc @hvanhovell

@SparkQA
Copy link

SparkQA commented Apr 21, 2017

Test build #76048 has finished for PR 17724 at commit c83b4ee.

  • This patch fails to generate documentation.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • .doc(\"Name of the class used to configure Spark Session extensions. The class should \" +
  • class SparkSessionExtensions

@hvanhovell
Copy link
Contributor

LGTM

@SparkQA
Copy link

SparkQA commented Apr 22, 2017

Test build #76049 has finished for PR 17724 at commit 105962a.

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

/**
* Inject extensions into the [[SparkSession]]. This allows a user to add Analyzer rules,
* Optimizer rules, Planning Strategies or a customized parser.
*
Copy link
Member

Choose a reason for hiding this comment

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

In the JIRA, the target version is 2.2. Do we still plan to backport it to 2.2.0?

* .master("...")
* .conf("...", true)
* .withExtensions { extensions =>
* extensions.injectAnalyzerRule { session =>
Copy link
Member

Choose a reason for hiding this comment

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

injectAnalyzerRule -> buildResolutionRules?

@gatorsmile
Copy link
Member

LGTM

@SparkQA
Copy link

SparkQA commented Apr 25, 2017

Test build #76146 has finished for PR 17724 at commit 72b9cab.

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

@mridulm
Copy link
Contributor

mridulm commented Apr 26, 2017

Can we add SQL to pr title ? Extension to spark implies core, and means something different :-)

asfgit pushed a commit that referenced this pull request Apr 26, 2017
## What changes were proposed in this pull request?

This patch adds support for customizing the spark session by injecting user-defined custom extensions. This allows a user to add custom analyzer rules/checks, optimizer rules, planning strategies or even a customized parser.

## How was this patch tested?

Unit Tests in SparkSessionExtensionSuite

Author: Sameer Agarwal <[email protected]>

Closes #17724 from sameeragarwal/session-extensions.

(cherry picked from commit caf3920)
Signed-off-by: Xiao Li <[email protected]>
@gatorsmile
Copy link
Member

Thanks! Merging to master/2.2

@asfgit asfgit closed this in caf3920 Apr 26, 2017
@sameeragarwal
Copy link
Member Author

@mridulm my apologies -- I agree with your point but missed seeing this comment before the patch was merged. I hope the conf name (spark.sql.extensions) would make the intent clear.

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.

5 participants