You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by liancheng <gi...@git.apache.org> on 2015/04/03 15:48:15 UTC
[GitHub] spark pull request: [SPARK-6696] [SQL] Adds HiveContext.refreshTab...
GitHub user liancheng opened a pull request:
https://github.com/apache/spark/pull/5349
[SPARK-6696] [SQL] Adds HiveContext.refreshTable to PySpark
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/liancheng/spark py-refresh-table
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/5349.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 #5349
----
commit 004bec0e257573995664e6ecc096350d9350496e
Author: Cheng Lian <li...@databricks.com>
Date: 2015-04-03T13:45:59Z
Adds HiveContext.refreshTable to PySpark
----
---
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-6696] [SQL] Adds HiveContext.refreshTab...
Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:
https://github.com/apache/spark/pull/5349#issuecomment-89610598
We need a properly configured Hive environment to run the test. I can add a simple `TestHive`-like class to do metastore / warehouse configurations though.
---
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-6696] [SQL] Adds HiveContext.refreshTab...
Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:
https://github.com/apache/spark/pull/5349#issuecomment-91088466
Thanks, I merged this to master. Would be great to add a TestHive wrapper in a followup PR.
---
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-6696] [SQL] Adds HiveContext.refreshTab...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:
https://github.com/apache/spark/pull/5349#issuecomment-89317866
[Test build #29671 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/29671/consoleFull) for PR 5349 at commit [`004bec0`](https://github.com/apache/spark/commit/004bec0e257573995664e6ecc096350d9350496e).
* 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-6696] [SQL] Adds HiveContext.refreshTab...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:
https://github.com/apache/spark/pull/5349#issuecomment-89295621
[Test build #29671 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/29671/consoleFull) for PR 5349 at commit [`004bec0`](https://github.com/apache/spark/commit/004bec0e257573995664e6ecc096350d9350496e).
---
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-6696] [SQL] Adds HiveContext.refreshTab...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/spark/pull/5349
---
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-6696] [SQL] Adds HiveContext.refreshTab...
Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:
https://github.com/apache/spark/pull/5349#issuecomment-89392350
Can't we add that testing snippet to tests.py?
---
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-6696] [SQL] Adds HiveContext.refreshTab...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/5349#issuecomment-89317901
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/29671/
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-6696] [SQL] Adds HiveContext.refreshTab...
Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:
https://github.com/apache/spark/pull/5349#issuecomment-89318424
Didn't write a test for this because we don't have Hive testing infra like `TestHive` in Scala code for PySpark yet. I opened this PR to make code snippets in #5348 more complete. But then I realize we can always use `sqlCtx.sql("REFRESH TABLE my_table")` in Python. So this PR doesn't seem that necessary.
Tested this locally with the following snippet:
```python
import tempfile, shutil
jsonFile = tempfile.mkdtemp()
shutil.rmtree(jsonFile)
sqlCtx.createDataFrame([("a", "b")])\
.toJSON()\
.saveAsTextFile(jsonFile)
sqlCtx.sql(
"CREATE TABLE jt " +
"USING org.apache.spark.sql.json " +
"OPTIONS (path '%s')" % jsonFile)
sqlCtx.sql("SELECT * FROM jt").show()
# _1 _2
# a b
shutil.rmtree(jsonFile)
sqlCtx.createDataFrame([("a", "b", "c")])\
.toJSON()\
.saveAsTextFile(jsonFile)
sqlCtx.sql("SELECT * FROM jt").show()
# _1 _2
# a b
sqlCtx.refreshTable("jt")
sqlCtx.sql("SELECT * FROM jt").show()
# _1 _2 _3
# a b c
```
---
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