Skip to content

[SPARK-59273][SQL][FOLLOWUP] Skip non-string columns in fill - #58647

Closed
zhangxinyao88 wants to merge 1 commit into
apache:masterfrom
zhangxinyao88:codex/SPARK-59273-fix-fill-type-match
Closed

zhangxinyao88 wants to merge 1 commit into
apache:masterfrom
zhangxinyao88:codex/SPARK-59273-fix-fill-type-match

Conversation

@zhangxinyao88

Copy link
Copy Markdown

What changes were proposed in this pull request?

Restore DataFrameNaFunctions.fillValue behavior for string replacements: non-string columns are skipped rather than falling through to an exception.

The existing SPARK-59273 CHAR/VARCHAR test now also includes an integer column, ensuring na.fill("x") fills the string-family columns while leaving the integer column unchanged.

Why are the changes needed?

SPARK-59273 changed the string match from exact StringType equality to a StringType subtype match so CHAR and VARCHAR columns are included. Without a fallback for other column types, a normal mixed string/integer DataFrame throws StringType is not matched at fillValue. This regresses na.fill("x") in Scala, PySpark, SparkR, and Connect tests.

Does this PR introduce any user-facing change?

Yes. It restores the existing behavior of DataFrame.na.fill("...") on DataFrames that contain both string-family and non-string columns.

How was this patch tested?

  • ./build/sbt -Phadoop-3 -Dsbt.supershell=false 'sql/testOnly org.apache.spark.sql.DataFrameNaFunctionsSuite -- -z "fill"'\n\n### Was this patch authored or co-authored using generative AI tooling?\n\nGenerated-by: Codex (GPT-5)

@uros-b uros-b left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@zhangxinyao88 Is this fix still relevant? If so, please resolve conflicts.

@uros-b

uros-b commented Sep 9, 2026

Copy link
Copy Markdown
Member

Seems like this was superseded by #58646 (already merged). Shall we close the current PR @zhangxinyao88?

@zhangxinyao88

Copy link
Copy Markdown
Author

Thanks, #58646 covers the same regression and is now in master. Closing this PR.

@zhangxinyao88
zhangxinyao88 deleted the codex/SPARK-59273-fix-fill-type-match branch September 9, 2026 18:03
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.

2 participants