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

Fix the trim logic in UTF8String.toInt/toLong did't handle Chinese characters correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.1
    • SQL

    Description

      The trim logic in Cast expression introduced in https://github.com/apache/spark/pull/26622 will trim chinese characters unexpectly.

      For example,  sql  select cast("1中文" as float) gives 1 instead of null

       

      Attachments

        1. error.log
          8 kB
          王俊博

        Issue Links

          Activity

            People

              EdisonWang EdisonWang
              EdisonWang EdisonWang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: