Skip to content

[SPARK-14081][SQL] - Preserve DataFrame column types when filling nulls.#11967

Closed
traviscrawford wants to merge 1 commit intoapache:masterfrom
traviscrawford:SPARK-14081-dataframena
Closed

[SPARK-14081][SQL] - Preserve DataFrame column types when filling nulls.#11967
traviscrawford wants to merge 1 commit intoapache:masterfrom
traviscrawford:SPARK-14081-dataframena

Conversation

@traviscrawford
Copy link

What changes were proposed in this pull request?

This change resolves an issue where DataFrameNaFunctions.fill changes a FloatType column to a DoubleType. We also clarify the contract that replacement values will be cast to the column data type, which may change the replacement value when casting to a lower precision type.

How was this patch tested?

This patch has associated unit tests.

Copy link
Author

Choose a reason for hiding this comment

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

The data type pattern match has been removed because I believe its unnecessary. I'm happy to put this back, along with a comment describing what special-case it covers, if someone can clue me into why its needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is used to convert NaN values into null. Otherwise we won't fill NaN values.

@JoshRosen
Copy link
Contributor

Jenkins, this is ok to test.

@SparkQA
Copy link

SparkQA commented Mar 25, 2016

Test build #54216 has finished for PR 11967 at commit 834ee69.

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

@rxin
Copy link
Contributor

rxin commented Mar 26, 2016

@traviscrawford can you remove the part about this is your first contribution from the pr description? The pr description will actually become part of the commit.

@rxin
Copy link
Contributor

rxin commented Mar 26, 2016

Looks like there is a test failure.

@traviscrawford traviscrawford force-pushed the SPARK-14081-dataframena branch from 834ee69 to 9dfe2dd Compare March 30, 2016 14:18
@SparkQA
Copy link

SparkQA commented Mar 30, 2016

Test build #54523 has finished for PR 11967 at commit 9dfe2dd.

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

@rxin
Copy link
Contributor

rxin commented Mar 30, 2016

@traviscrawford can you update the pr title to have a full sentence? github is cutting it off.

@rxin
Copy link
Contributor

rxin commented Mar 30, 2016

LGTM - we should merge this as soon as you update the title.

@traviscrawford traviscrawford changed the title [SPARK-14081][SQL] - Update DataFrameNaFunctions.fill to preserve column dat… [SPARK-14081][SQL] - Preserve DataFrame column types when filling nulls. Mar 30, 2016
@traviscrawford
Copy link
Author

Title updated.

@rxin
Copy link
Contributor

rxin commented Mar 30, 2016

Thanks - I've merged this in master.

@asfgit asfgit closed this in da54abf Mar 31, 2016
Sign up for free to 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