Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-41456

Improve the performance of try_cast

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • SQL
    • None

    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.

      Attachments

        Activity

          People

            Gengliang.Wang Gengliang Wang
            Gengliang.Wang Gengliang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: