[AURON #2153] Implement native function of map_from_entries#2169
Open
weimingdiit wants to merge 1 commit intoapache:masterfrom
Open
[AURON #2153] Implement native function of map_from_entries#2169weimingdiit wants to merge 1 commit intoapache:masterfrom
weimingdiit wants to merge 1 commit intoapache:masterfrom
Conversation
25 tasks
578de9e to
798ff75
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds native execution-path support for Spark map_from_entries(...) via Auron’s extension-function mechanism, including Spark-compatible null/duplicate-key semantics and regression/unit test coverage.
Changes:
- Adds Spark-side conversion for
MapFromEntries, passingspark.sql.mapKeyDedupPolicyinto the native call. - Registers and implements
Spark_MapFromEntriesindatafusion-ext-functionswith Spark-compatible semantics. - Adds Scala regression tests and Rust unit tests covering null handling and dedup policies.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala | Converts Spark MapFromEntries into Spark_MapFromEntries, passing dedup policy. |
| spark-extension-shims-spark/src/test/scala/org/apache/auron/AuronFunctionSuite.scala | Adds end-to-end Spark-vs-native regression tests for map_from_entries. |
| native-engine/datafusion-ext-functions/src/spark_map.rs | Implements native map_from_entries and adds Rust unit tests. |
| native-engine/datafusion-ext-functions/src/lib.rs | Registers Spark_MapFromEntries extension function. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: weimingdiit <weimingdiit@gmail.com>
26c23de to
8caebc4
Compare
slfan1989
approved these changes
Apr 9, 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 #2153
Rationale for this change
map_from_entries(...)was not supported in Auron’s native execution path.This PR extends native coverage for Spark map functions using the existing extension-function pattern already used for Spark-specific functions such as
map_concat(...). The goal is to support this function natively while preserving Spark-compatible behavior.What changes are included in this PR?
This PR:
MapFromEntriesconversion inNativeConvertersspark.sql.mapKeyDedupPolicyto the native implementationSpark_MapFromEntriesindatafusion-ext-functionsmap_from_entries(...)inspark_map.rsLAST_WIN-> last value winsAuronFunctionSuitespark_map.rsAre there any user-facing changes?
Queries using
map_from_entries(arrayOfEntries)can now run through Auron’s native extension-function path instead of falling back or remaining unsupported.How was this patch tested?
CI.