You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by scwf <gi...@git.apache.org> on 2015/04/27 10:00:35 UTC
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
GitHub user scwf opened a pull request:
https://github.com/apache/spark/pull/5715
[SPARK-7163] [SQL] minor refactory for HiveQl
A work to refactory hiveql to make it more clean and readable
1 move ASTNode related util method to a new object named HiveASTNodeUtil
2 delete no use method in HiveQl
3 override `sqlParser` in hivecontext by `ExtendedHiveQlParser`, instead of making a new `ddlParserWithHiveQL` and calling `HiveQl.parseSql` in hivecontext.
4 rename HiveQl to HiveQlConverter
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/scwf/spark hiveql-refactory
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/5715.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5715
----
commit b40ad71e66046455edb1ac01ef74855b6dd43436
Author: wangfei <wa...@huawei.com>
Date: 2015-04-27T03:40:20Z
draft
commit 5b3f9f52c43f5ee764b1c203142e0c48a915e016
Author: wangfei <wa...@huawei.com>
Date: 2015-04-27T06:20:49Z
remove astnode related method to HiveASTNodeUtil
commit d7a0433a4bfaba527907ca800fcd275e5941a5bb
Author: wangfei <wa...@huawei.com>
Date: 2015-04-27T06:59:06Z
compile issue
commit fed7b58c8e6f1f6cc523c8eedb25003bf3a0bae1
Author: wangfei <wa...@huawei.com>
Date: 2015-04-27T07:25:25Z
fix substituted
commit 82df766b1d584fc49ee3711bf1b8f655e4d58c9e
Author: wangfei <wa...@huawei.com>
Date: 2015-04-27T07:31:35Z
added @transient for sqlParser
commit f76a7b1eb2cec2c922f8a82e3e67da03984e886e
Author: wangfei <wa...@huawei.com>
Date: 2015-04-27T07:46:59Z
style issue
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:
https://github.com/apache/spark/pull/5715#issuecomment-137565491
Can we close this issue until you have time to bring it up to date?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/5715#issuecomment-97615580
Merged build started.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
Posted by scwf <gi...@git.apache.org>.
Github user scwf commented on a diff in the pull request:
https://github.com/apache/spark/pull/5715#discussion_r29126734
--- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
@@ -81,11 +81,38 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
protected[sql] def convertCTAS: Boolean =
getConf("spark.sql.hive.convertCTAS", "false").toBoolean
- override protected[sql] def executePlan(plan: LogicalPlan): this.QueryExecution =
- new this.QueryExecution(plan)
+ /* A catalyst metadata catalog that points to the Hive Metastore. */
+ @transient
+ override protected[sql] lazy val catalog = new HiveMetastoreCatalog(this) with OverrideCatalog
--- End diff --
reorder to make catalog, functionRegistry, analyzer, sqlParser togethor
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/5715#issuecomment-97615566
Merged build triggered.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:
https://github.com/apache/spark/pull/5715#issuecomment-96597552
[Test build #30962 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/30962/consoleFull) for PR 5715 at commit [`f76a7b1`](https://github.com/apache/spark/commit/f76a7b1eb2cec2c922f8a82e3e67da03984e886e).
* This patch **passes all tests**.
* This patch merges cleanly.
* This patch adds no public classes.
* This patch does not change any dependencies.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/5715#issuecomment-97629144
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/31353/
Test PASSed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/5715#issuecomment-97629142
Merged build finished. Test PASSed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:
https://github.com/apache/spark/pull/5715#issuecomment-97629138
[Test build #31353 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/31353/consoleFull) for PR 5715 at commit [`6081494`](https://github.com/apache/spark/commit/6081494ceb331df4349f972ce7d18aab2c73f620).
* This patch **passes all tests**.
* This patch merges cleanly.
* This patch adds no public classes.
* This patch does not change any dependencies.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
Posted by scwf <gi...@git.apache.org>.
Github user scwf commented on a diff in the pull request:
https://github.com/apache/spark/pull/5715#discussion_r29126807
--- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
@@ -81,11 +81,38 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
protected[sql] def convertCTAS: Boolean =
getConf("spark.sql.hive.convertCTAS", "false").toBoolean
- override protected[sql] def executePlan(plan: LogicalPlan): this.QueryExecution =
- new this.QueryExecution(plan)
+ /* A catalyst metadata catalog that points to the Hive Metastore. */
+ @transient
+ override protected[sql] lazy val catalog = new HiveMetastoreCatalog(this) with OverrideCatalog
+
+ // Note that HiveUDFs will be overridden by functions registered in this context.
+ @transient
+ override protected[sql] lazy val functionRegistry =
+ new HiveFunctionRegistry with OverrideFunctionRegistry {
+ def caseSensitive: Boolean = false
+ }
+ /* An analyzer that uses the Hive metastore. */
@transient
- protected[sql] val ddlParserWithHiveQL = new DDLParser(HiveQl.parseSql(_))
--- End diff --
we do not need this, since if we override sqlParser, we can inherited from sqlcontext the ddlParser
`
protected[sql] val ddlParser = new DDLParser(sqlParser.parse(_))
`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:
https://github.com/apache/spark/pull/5715#issuecomment-97615622
[Test build #31353 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/31353/consoleFull) for PR 5715 at commit [`6081494`](https://github.com/apache/spark/commit/6081494ceb331df4349f972ce7d18aab2c73f620).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/spark/pull/5715
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-7163] [SQL] minor refactory for HiveQl
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:
https://github.com/apache/spark/pull/5715#issuecomment-96552130
[Test build #30962 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/30962/consoleFull) for PR 5715 at commit [`f76a7b1`](https://github.com/apache/spark/commit/f76a7b1eb2cec2c922f8a82e3e67da03984e886e).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org