[AURON #1712] Fix Casting from Map to Utf8 not supported#1744
Merged
richox merged 1 commit intoapache:masterfrom Dec 17, 2025
Merged
[AURON #1712] Fix Casting from Map to Utf8 not supported#1744richox merged 1 commit intoapache:masterfrom
richox merged 1 commit intoapache:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements support for casting Map types to Utf8 (String) in the Auron query engine, addressing issue #1712. The implementation follows Spark-compatible formatting, where maps are rendered as {key1 -> value1, key2 -> value2}, and properly handles nested types and null values.
Key Changes:
- Added map-to-string casting logic in the Rust cast implementation that recursively converts keys and values to strings
- Added comprehensive unit tests in both Rust (4 tests) and Scala (4 tests) covering basic maps, null maps, empty maps, and nested/complex maps
- The implementation mirrors the existing struct-to-string casting pattern for consistency
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| native-engine/datafusion-ext-commons/src/arrow/cast.rs | Adds map-to-string casting implementation (lines 222-267) with Spark-compatible formatting and 4 comprehensive unit tests covering various map scenarios |
| spark-extension-shims-spark/src/test/scala/org.apache.auron/AuronQuerySuite.scala | Adds 4 integration tests for map-to-string casting, properly gated for Spark 3.1+, covering simple maps, nested maps, maps with struct values, and empty maps |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
richox
approved these changes
Dec 17, 2025
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 #1712
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?
How was this patch tested?
Add UT