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

`regexp_replace('', '[a\\\\d]{0, 2}', 'x')` causes an internal error

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.4.0
    • SQL
    • None
    • Spark3.3.0 local mode

    Description

      scala> spark.sql("select regexp_replace('', '[a\\\\d]{0,2}', 'x')").show
      +----------------------------------+
      |regexp_replace(, [a\d]\{0,2}, x, 1)|
      +----------------------------------+
      |                                 x|
      +----------------------------------+
       
       
      scala> spark.sql("select regexp_replace('', '[a\\\\d]{0, 2}', 'x')").show
      org.apache.spark.SparkException: The Spark SQL phase optimization failed with an internal error. Please, fill a bug report in, and provide the full stack trace.
      

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            panbingkun BingKun Pan
            remziy Remzi Yang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment