Skip to content
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

[SPARK-13893][SQL] Remove SQLContext.catalog/analyzer (internal method) #11716

Closed
wants to merge 2 commits into from

Conversation

rxin
Copy link
Contributor

@rxin rxin commented Mar 15, 2016

What changes were proposed in this pull request?

Our internal code can go through SessionState.catalog and SessionState.analyzer. This brings two small benefits:

  1. Reduces internal dependency on SQLContext.
  2. Removes 2 public methods in Java (Java does not obey package private visibility).

More importantly, according to the design in SPARK-13485, we'd need to claim this catalog function for the user-facing public functions, rather than having an internal field.

How was this patch tested?

Existing unit/integration test code.

@rxin
Copy link
Contributor Author

rxin commented Mar 15, 2016

cc @cloud-fan one more ...

@@ -113,8 +113,6 @@ class HiveContext private[hive](
@transient
protected[sql] override lazy val sessionState = new HiveSessionState(self)

protected[sql] override def catalog = sessionState.catalog
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like this is the last one :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there are more actually ... in sqlcontext

@cloud-fan
Copy link
Contributor

LGTM

@rxin rxin changed the title [SPARK-13893][SQL] Remove SQLContext.catalog (internal method) [SPARK-13893][SQL] Remove SQLContext.catalog/analyzer (internal method) Mar 15, 2016
@rxin
Copy link
Contributor Author

rxin commented Mar 15, 2016

@cloud-fan Had an extra minute - I went ahead and removed analyzer as well.

@cloud-fan
Copy link
Contributor

LGTM

@SparkQA
Copy link

SparkQA commented Mar 15, 2016

Test build #53177 has finished for PR 11716 at commit 49197aa.

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

@SparkQA
Copy link

SparkQA commented Mar 15, 2016

Test build #53174 has finished for PR 11716 at commit c5fd485.

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

@rxin
Copy link
Contributor Author

rxin commented Mar 15, 2016

Thanks - merging in master.

@asfgit asfgit closed this in 5e6f2f4 Mar 15, 2016
roygao94 pushed a commit to roygao94/spark that referenced this pull request Mar 22, 2016
## What changes were proposed in this pull request?
Our internal code can go through SessionState.catalog and SessionState.analyzer. This brings two small benefits:
1. Reduces internal dependency on SQLContext.
2. Removes 2 public methods in Java (Java does not obey package private visibility).

More importantly, according to the design in SPARK-13485, we'd need to claim this catalog function for the user-facing public functions, rather than having an internal field.

## How was this patch tested?
Existing unit/integration test code.

Author: Reynold Xin <rxin@databricks.com>

Closes apache#11716 from rxin/SPARK-13893.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants