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

allCaseVersions function in SqlLexical leads to StackOverflow Exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1.1, 1.2.0
    • 1.3.0
    • SQL
    • None

    Description

      Recently I found a bug when I add new feature in SqlParser. Which is :
      If I define a KeyWord that has a long name. Likeļ¼š
      ```protected val ļ¼šSERDEPROPERTIES = Keyword("SERDEPROPERTIES")```

      Since the all case version is implement by recursive function, so when ```implicit asParser`` function is called and the stack memory is very small, it will leads to SO Exception.

      java.lang.StackOverflowError
      at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254)
      at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254)
      at scala.util.parsing.combinator.Parsers$$anon$3.apply(Parsers.scala:222)
      at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254)
      at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              OopsOutOfMemory OopsOutOfMemory
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 96h
                  96h
                  Remaining:
                  Remaining Estimate - 96h
                  96h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified