[Enhancement] add trino function map_agg (backport #66673)#67398
Closed
mergify[bot] wants to merge 1 commit intobranch-3.3from
Closed
[Enhancement] add trino function map_agg (backport #66673)#67398mergify[bot] wants to merge 1 commit intobranch-3.3from
mergify[bot] wants to merge 1 commit intobranch-3.3from
Conversation
(cherry picked from commit 5bb8ab7)
22 tasks
Contributor
Author
auto-merge was automatically disabled
December 31, 2025 15:00
Pull request was closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I'm doing:
When using the Trino dialect, the map_agg function is not supported.
https://trino.io/docs/385/functions/aggregate.html?highlight=map_agg#map_agg
What I'm doing:
map_agg(key, value) -> map_from_arrays(array_agg(key), array_agg(value))
support the map_agg function.
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check:
Note
Adds Trino
map_agg(key, value)support by rewriting tomap_from_arrays(array_agg(key), array_agg(value))and includes a unit test.fe/fe-core/src/main/java/com/starrocks/connector/parser/trino/ComplexFunctionCallTransformer.java:map_agg(key, value)->map_from_arrays(array_agg(key), array_agg(value))with arg count validation.fe/fe-core/src/test/java/com/starrocks/connector/parser/trino/TrinoFunctionTransformTest.java:testMapFunctionasserting transformation toarray_agg('key'), array_agg('value')andmap_from_arrays(...).Written by Cursor Bugbot for commit db8dedd. This will update automatically on new commits. Configure here.
This is an automatic backport of pull request #66673 done by [Mergify](https://mergify.com).