This is an automated email from the ASF dual-hosted git repository.

ruifengz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 7182a79d70da [SPARK-55463][PYTHON][FOLLOW-UP] Delete unnecessary 
`date_as_object=True` in VariantType conversion
7182a79d70da is described below

commit 7182a79d70da46490aafb4f73d84112cb7583e71
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Fri Feb 27 12:34:40 2026 +0800

    [SPARK-55463][PYTHON][FOLLOW-UP] Delete unnecessary `date_as_object=True` 
in VariantType conversion
    
    ### What changes were proposed in this pull request?
    Delete unnecessary `date_as_object=True`
    
    ### Why are the changes needed?
    1, VariantType is not supposed to include any date fields;
    2, `date_as_object` actually defaults to True, according to the [API 
reference](https://arrow.apache.org/docs/python/generated/pyarrow.Array.html#pyarrow.Array.to_pandas)
    
    Remove it to be consistent with changes from 
https://github.com/apache/spark/pull/54303/changes
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    CI
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Closes #54509 from zhengruifeng/del_date_obj.
    
    Authored-by: Ruifeng Zheng <[email protected]>
    Signed-off-by: Ruifeng Zheng <[email protected]>
---
 python/pyspark/sql/conversion.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/pyspark/sql/conversion.py b/python/pyspark/sql/conversion.py
index e0708716a46c..c10e7173cb57 100644
--- a/python/pyspark/sql/conversion.py
+++ b/python/pyspark/sql/conversion.py
@@ -1705,7 +1705,7 @@ class ArrowArrayToPandasConversion:
                 else None
             )
         elif isinstance(spark_type, VariantType):
-            series = arr.to_pandas(date_as_object=True)
+            series = arr.to_pandas()
             series = series.map(
                 lambda v: VariantVal(v["value"], v["metadata"]) if v is not 
None else None
             )


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

Reply via email to