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

   ### What changes were proposed in this pull request?
   Refine the string representation of `Cast`
   
   
   ### Why are the changes needed?
   try the best to make the string representation consistent with Spark Classic
   
   
   ### Does this PR introduce _any_ user-facing change?
   Spark Classic:
   ```
   In [1]: from pyspark.sql import functions as sf
   
   In [2]: sf.col("a").try_cast("int")
   Out[2]: Column<'TRY_CAST(a AS INT)'>
   ```
   
   Spark Connect, before this PR:
   ```
   In [1]: from pyspark.sql import functions as sf
   
   In [2]: sf.col("a").try_cast("int")
   Out[2]: Column<'(a (int))'>
   ```
   
   Spark Connect, after this PR:
   ```
   In [1]: from pyspark.sql import functions as sf
   
   In [2]: sf.col("a").try_cast("int")
   Out[2]: Column<'TRY_CAST(a AS INT)'>
   ```
   
   
   ### How was this patch tested?
   added tests
   
   ### Was this patch authored or co-authored using generative AI tooling?
   no


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