You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "shaoqinzhou (Jira)" <ji...@apache.org> on 2025/09/25 14:33:00 UTC

[jira] [Created] (SPARK-53718) Add a new Optimizer rule to flatten nested MapConcat expressions

shaoqinzhou created SPARK-53718:
-----------------------------------

             Summary: Add a new Optimizer rule to flatten nested MapConcat expressions
                 Key: SPARK-53718
                 URL: https://issues.apache.org/jira/browse/SPARK-53718
             Project: Spark
          Issue Type: Improvement
          Components: Optimizer
    Affects Versions: 4.1.0
            Reporter: shaoqinzhou


Add a new Optimizer rule to flatten nested MapConcat expressions in two ways:

1. Flattens nested MapConcat expressions into a single MapConcat
Example: 
{code:java}
map_concat(map('a', 'a1'), map_concat(map('b', 'b1'), map('c', 'c1'))) → map_concat(map('a', 'a1'), map('b', 'b1'), map('c', 'c1')) {code}

2. Extracts the child directly when MapConcat has only one child
Example:
{code:java}
map_concat(map('a', 'a1')) → map('a', 'a1') {code}
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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