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

CodegenContext.withSubExprEliminationExprs should save/restore CSE state correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0, 2.2.1, 2.3.0
    • 2.3.1, 2.4.0
    • SQL
    • None

    Description

      There's a bug in CodegenContext.withSubExprEliminationExprs() that makes it effectively always clear the subexpression elimination state after it's called.

      The original intent of this function was that it should save the old state, set the given new state as current and perform codegen (invoke Expression.genCode()), and at the end restore the subexpression elimination state back to the old state. This ticket tracks a fix to actually implement the original intent.

      Attachments

        Activity

          People

            rednaxelafx Kris Mok
            rednaxelafx Kris Mok
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: