You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gengliang Wang (Jira)" <ji...@apache.org> on 2022/12/09 05:18:00 UTC
[jira] [Updated] (SPARK-41456) Improve the performance of try_cast
[ 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org