Skip to content

Conversation

MRKKmrkk
Copy link

What changes were proposed in this pull request?

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

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

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

Does this PR introduce any user-facing change?

No.

How was this patch tested?

SQLQueryTestSuite and CombineMapConcatsSuite.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the SQL label Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant