You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "L. C. Hsieh (Jira)" <ji...@apache.org> on 2021/05/28 23:12:00 UTC

[jira] [Created] (SPARK-35560) Remove redundant subexpression evaluation in nested subexpressions

L. C. Hsieh created SPARK-35560:
-----------------------------------

             Summary: Remove redundant subexpression evaluation in nested subexpressions
                 Key: SPARK-35560
                 URL: https://issues.apache.org/jira/browse/SPARK-35560
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 3.2.0
            Reporter: L. C. Hsieh
            Assignee: L. C. Hsieh


In some cases, whole-stage codegen's subexpression elimination will do redundant subexpression evaluation. We should reduce it. For example, if we have two sub-exprs:

1. simpleUDF($"id")
2. functions.length(simpleUDF($"id"))


We should only evaluate `simpleUDF($"id")` once, i.e.

subExpr1 = simpleUDF($"id");
subExpr2 = functions.length(subExpr1);



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org