You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Devin Petersohn (Jira)" <ji...@apache.org> on 2026/03/12 22:27:00 UTC

[jira] [Created] (SPARK-55980) Always apply _cast_back_float in numeric arithmetic

Devin Petersohn created SPARK-55980:
---------------------------------------

             Summary: Always apply _cast_back_float in numeric arithmetic
                 Key: SPARK-55980
                 URL: https://issues.apache.org/jira/browse/SPARK-55980
             Project: Spark
          Issue Type: Bug
          Components: Pandas API on Spark
    Affects Versions: 4.1.1
            Reporter: Devin Petersohn


`_cast_back_float()` preserves float32 dtype in arithmetic results, matching pandas behavior. Under ANSI mode, Spark widens float32 to float64 during arithmetic with non-float32 numeric operands, and this helper casts it back. Currently the helper is only called when ANSI mode is enabled, but it should always be called so behavior is the same with or without ANSI mode enabled.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org