zhengruifeng commented on code in PR #51006:
URL: https://github.com/apache/spark/pull/51006#discussion_r2122515256


##########
python/pyspark/pandas/strings.py:
##########
@@ -2031,7 +2031,13 @@ def pudf(s: pd.Series) -> pd.Series:
         if expand:
             psdf = psser.to_frame()
             scol = psdf._internal.data_spark_columns[0]
-            spark_columns = [scol[i].alias(str(i)) for i in range(n + 1)]
+
+            if ps.get_option("compute.ansi_mode_support"):

Review Comment:
   I mean just use
   ```
                   spark_columns = [
                       F.try_element_at(scol, F.lit(i + 1)).alias(str(i)) for i 
in range(n + 1)
                   ]
   ```
   to replace the old one.
   
   since the logic should be the same, I think we don't need the 
`ps.get_option("compute.ansi_mode_support")` which trigger a Config RPC



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to