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

[FOLLOW-UP][SPARK-23772][SQL] Provide an option to ignore column of all null values or empty array during JSON schema inference #22002

Closed
wants to merge 3 commits into from

Conversation

MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Aug 5, 2018

What changes were proposed in this pull request?

The dropFieldIfAllNull parameter of the json method wasn't set as an option. This PR fixes that.

How was this patch tested?

I added a test to sql/test.py

@MaxGekk
Copy link
Member Author

MaxGekk commented Aug 5, 2018

@maropu Please, have a look at the PR.

@SparkQA
Copy link

SparkQA commented Aug 5, 2018

Test build #94249 has finished for PR 22002 at commit 24808b2.

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

@SparkQA
Copy link

SparkQA commented Aug 5, 2018

Test build #94250 has finished for PR 22002 at commit 784a626.

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

@MaxGekk
Copy link
Member Author

MaxGekk commented Aug 5, 2018

jenkins, retest this, please

@SparkQA
Copy link

SparkQA commented Aug 5, 2018

Test build #94253 has finished for PR 22002 at commit 784a626.

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

@@ -267,7 +267,7 @@ def json(self, path, schema=None, primitivesAsString=None, prefersDecimal=None,
mode=mode, columnNameOfCorruptRecord=columnNameOfCorruptRecord, dateFormat=dateFormat,
timestampFormat=timestampFormat, multiLine=multiLine,
allowUnquotedControlChars=allowUnquotedControlChars, lineSep=lineSep,
samplingRatio=samplingRatio, encoding=encoding)
samplingRatio=samplingRatio, dropFieldIfAllNull=dropFieldIfAllNull, encoding=encoding)
Copy link
Member

Choose a reason for hiding this comment

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

oh... good catch. thanks.

@maropu
Copy link
Member

maropu commented Aug 6, 2018

LGTM cc: @HyukjinKwon

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

LGTM

@HyukjinKwon
Copy link
Member

Merged to master.

@asfgit asfgit closed this in 64ad7b8 Aug 6, 2018
@MaxGekk MaxGekk deleted the drop-field-if-all-null branch August 17, 2019 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants