[
https://issues.apache.org/jira/browse/SPARK-41456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gengliang Wang updated SPARK-41456:
-----------------------------------
Description:
For try_cast and the legacy cast (cast with ANSI SQL mode off), there are
conversion which has the same behaviors:
* cast(string as date/timestamp/TimestampNTZ)
* cast(string as double/float/decimal)
So, the try_cast can be faster if it uses the evaluation code path of the
legacy cast, instead of turning into ANSI cast and catching exceptions.
> Improve the performance of try_cast
> -----------------------------------
>
> Key: SPARK-41456
> URL: https://issues.apache.org/jira/browse/SPARK-41456
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.4.0
> Reporter: Gengliang Wang
> Assignee: Gengliang Wang
> Priority: Major
>
> For try_cast and the legacy cast (cast with ANSI SQL mode off), there are
> conversion which has the same behaviors:
> * cast(string as date/timestamp/TimestampNTZ)
> * cast(string as double/float/decimal)
> So, the try_cast can be faster if it uses the evaluation code path of the
> legacy cast, instead of turning into ANSI cast and catching exceptions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]