[AURON #2140] Implement native function of map_concat#2141
Open
weimingdiit wants to merge 5 commits intoapache:masterfrom
Open
[AURON #2140] Implement native function of map_concat#2141weimingdiit wants to merge 5 commits intoapache:masterfrom
weimingdiit wants to merge 5 commits intoapache:masterfrom
Conversation
15 tasks
Signed-off-by: weimingdiit <weimingdiit@gmail.com>
72b745e to
0e0baf3
Compare
f6ee74d to
217a515
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds native execution support for Spark SQL map_concat(...) by converting Spark’s MapConcat expression into an extension scalar function and implementing the function in the native engine, with a regression test to ensure queries no longer fall back.
Changes:
- Add Spark
MapConcatexpression conversion toNativeConvertersviabuildExtScalarFunction("Spark_MapConcat", ...). - Implement
Spark_MapConcatas a new native extension function (spark_map::map_concat) and register it indatafusion-ext-functions. - Add a Spark-side regression test in
AuronFunctionSuite.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala | Converts Spark MapConcat to the native extension-function call. |
| native-engine/datafusion-ext-functions/src/spark_map.rs | New native implementation of map_concat operating on Arrow MapArrays. |
| native-engine/datafusion-ext-functions/src/lib.rs | Registers Spark_MapConcat so the planner can resolve and execute it. |
| spark-extension-shims-spark/src/test/scala/org/apache/auron/AuronFunctionSuite.scala | Adds regression coverage to ensure map_concat runs natively and matches Spark results. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: weimingdiit <weimingdiit@gmail.com>
slfan1989
approved these changes
Apr 1, 2026
yew1eb
approved these changes
Apr 3, 2026
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.
Which issue does this PR close?
Closes ##2140
Rationale for this change
map_concat(...)was not supported in Auron’s native execution path, so queries using it fell back instead of being executed natively.This change adds support through the extension-function path, which fits the existing pattern for Spark-specific functions implemented outside the standard builtin
ScalarFunctionchain.What changes are included in this PR?
This PR:
MapConcatexpression conversion inNativeConvertersspark_map.rsSpark_MapConcatindatafusion-ext-functionsAuronFunctionSuiteAre there any user-facing changes?
NO.
How was this patch tested?
CI.