zhangxinyao88 opened a new pull request, #58647:
URL: https://github.com/apache/spark/pull/58647

   ### 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)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to