Yuming Wang created SPARK-60137:
-----------------------------------
Summary: Allow lossless widening cast in
ExprUtils.canEvaluateUnconditionally
Key: SPARK-60137
URL: https://issues.apache.org/jira/browse/SPARK-60137
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 5.0.0
Reporter: Yuming Wang
ExprUtils.canEvaluateUnconditionally checks whether an expression can be
evaluated unconditionally on additional rows without risking runtime failures.
Currently, it conservatively excludes all Cast expressions. However, lossless
numeric widening casts (where Cast.canUpCast(child.dataType, toType) is true)
are guaranteed not to fail at runtime or cause precision loss. We can safely
allow such widening casts in canEvaluateUnconditionally.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]