Skip to content

[SPARK-8532][SQL] In Python's DataFrameWriter, save/saveAsTable/json/parquet/jdbc always override mode - #6937

Closed
yhuai wants to merge 8 commits into
apache:masterfrom
yhuai:SPARK-8532
Closed

[SPARK-8532][SQL] In Python's DataFrameWriter, save/saveAsTable/json/parquet/jdbc always override mode#6937
yhuai wants to merge 8 commits into
apache:masterfrom
yhuai:SPARK-8532

Conversation

@yhuai

Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/SPARK-8532

This PR has two changes. First, it fixes the bug that save actions (i.e. save/saveAsTable/json/parquet/jdbc) always override mode. Second, it adds input argument partitionBy to save/saveAsTable/parquet.

@yhuai

Copy link
Copy Markdown
ContributorAuthor

@SparkQA

Copy link
Copy Markdown

Test build #35462 has finished for PR 6937 at commit 88eb6c4.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Comment threadpython/pyspark/sql/readwriter.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we should use "==" here

@SparkQA

Copy link
Copy Markdown

Test build #35465 has finished for PR 6937 at commit d696dff.

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

Comment threadpython/pyspark/sql/readwriter.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

new line here

@davies

Copy link
Copy Markdown
Contributor

LGTM

@SparkQA

Copy link
Copy Markdown

Test build #35475 has finished for PR 6937 at commit d37abd2.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Comment threadpython/pyspark/sql/readwriter.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

self.mode(mode)._jwrite.json(path)

@SparkQA

Copy link
Copy Markdown

Test build #35470 has finished for PR 6937 at commit 7fbc24b.

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

@yhuai

Copy link
Copy Markdown
ContributorAuthor

Oh, this one hits

Archiving artifacts
WARN: No artifacts found that match the file pattern "**/target/unit-tests.log". Configuration error?
WARN: java.lang.InterruptedException: no matches found within 10000
Recording test results
ERROR: Publisher 'Publish JUnit test result report' failed: No test report files were found. Configuration error?
Finished: FAILURE

@yhuai

Copy link
Copy Markdown
ContributorAuthor

I will merge it into master and branch-1.4 once SparkQA is happy.

@SparkQA

Copy link
Copy Markdown

Test build #35477 has finished for PR 6937 at commit f972d5d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class PCAModel(JavaVectorTransformer):
    • class PCA(object):

@AmplabJenkins

Copy link
Copy Markdown

Merged build finished. Test FAILed.

asfgit pushed a commit that referenced this pull request Jun 22, 2015
…/parquet/jdbc always override mode
https://issues.apache.org/jira/browse/SPARK-8532
This PR has two changes. First, it fixes the bug that save actions (i.e. `save/saveAsTable/json/parquet/jdbc`) always override mode. Second, it adds input argument `partitionBy` to `save/saveAsTable/parquet`.
Author: Yin Huai <yhuai@databricks.com>
Closes#6937 from yhuai/SPARK-8532 and squashes the following commits:
f972d5d [Yin Huai] davies's comment.
d37abd2 [Yin Huai] style.
d21290a [Yin Huai] Python doc.
889eb25 [Yin Huai] Minor refactoring and add partitionBy to save, saveAsTable, and parquet.
7fbc24b [Yin Huai] Use None instead of "error" as the default value of mode since JVM-side already uses "error" as the default value.
d696dff [Yin Huai] Python style.
88eb6c4 [Yin Huai] If mode is "error", do not call mode method.
c40c461 [Yin Huai] Regression test.
(cherry picked from commit 5ab9fcf)
Signed-off-by: Yin Huai <yhuai@databricks.com>
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 22, 2015
…/parquet/jdbc always override mode
https://issues.apache.org/jira/browse/SPARK-8532
This PR has two changes. First, it fixes the bug that save actions (i.e. `save/saveAsTable/json/parquet/jdbc`) always override mode. Second, it adds input argument `partitionBy` to `save/saveAsTable/parquet`.
Author: Yin Huai <yhuai@databricks.com>
Closesapache#6937 from yhuai/SPARK-8532 and squashes the following commits:
f972d5d [Yin Huai] davies's comment.
d37abd2 [Yin Huai] style.
d21290a [Yin Huai] Python doc.
889eb25 [Yin Huai] Minor refactoring and add partitionBy to save, saveAsTable, and parquet.
7fbc24b [Yin Huai] Use None instead of "error" as the default value of mode since JVM-side already uses "error" as the default value.
d696dff [Yin Huai] Python style.
88eb6c4 [Yin Huai] If mode is "error", do not call mode method.
c40c461 [Yin Huai] Regression test.
(cherry picked from commit 5ab9fcf)
Signed-off-by: Yin Huai <yhuai@databricks.com>
animeshbaranawal pushed a commit to animeshbaranawal/spark that referenced this pull request Jun 25, 2015
…/parquet/jdbc always override mode
https://issues.apache.org/jira/browse/SPARK-8532
This PR has two changes. First, it fixes the bug that save actions (i.e. `save/saveAsTable/json/parquet/jdbc`) always override mode. Second, it adds input argument `partitionBy` to `save/saveAsTable/parquet`.
Author: Yin Huai <yhuai@databricks.com>
Closesapache#6937 from yhuai/SPARK-8532 and squashes the following commits:
f972d5d [Yin Huai] davies's comment.
d37abd2 [Yin Huai] style.
d21290a [Yin Huai] Python doc.
889eb25 [Yin Huai] Minor refactoring and add partitionBy to save, saveAsTable, and parquet.
7fbc24b [Yin Huai] Use None instead of "error" as the default value of mode since JVM-side already uses "error" as the default value.
d696dff [Yin Huai] Python style.
88eb6c4 [Yin Huai] If mode is "error", do not call mode method.
c40c461 [Yin Huai] Regression test.
Sign up for freeto 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

@yhuai@SparkQA@davies@AmplabJenkins