Skip to content

[SPARK-52363][SQL][TESTS] Analyzer NameScope test for nested struct fields inside map values #51059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

dengziming
Copy link
Member

What changes were proposed in this pull request?

This PR adds test coverage for resolving nested struct fields inside Map values which was missing in the original test suite.

Why are the changes needed?

The new test verifies that multi-part resolution like mapColumn['key'].nestedField works correctly, we already defined a field col11MapWithStruct, but we didn't test it properly.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Unneeded

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

No

@github-actions github-actions bot added the SQL label May 31, 2025
@dengziming
Copy link
Member Author

@vladimirg-db Hello, when I was reading the new Analyzer code, I found we didn't use col11MapWithStruct property, we just treat it the same as col10Map, this should be altered.

Copy link
Contributor

@vladimirg-db vladimirg-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this improvement @dengziming !

@dengziming
Copy link
Member Author

Thanks @vladimirg-db , I found that we also lack tests for some new analyzer components such as CteRegistry and SubqueryRegistry, should we also add them.

@vladimirg-db
Copy link
Contributor

These components are relatively trivial. We rely on analyzed plan golden files for them: #50568

@HyukjinKwon HyukjinKwon changed the title [SPARK-52363] [SQL] Analyzer NameScope test for nested struct fields inside map values [SPARK-52363][SQL][TESTS] Analyzer NameScope test for nested struct fields inside map values Jun 1, 2025
@HyukjinKwon
Copy link
Member

Merged to master.

@dengziming
Copy link
Member Author

These components are relatively trivial. We rely on analyzed plan golden files for them: #50568

Thanks for the explanation @vladimirg-db

yhuang-db pushed a commit to yhuang-db/spark that referenced this pull request Jun 9, 2025
…ields inside map values

### What changes were proposed in this pull request?
This PR adds test coverage for resolving nested struct fields inside Map values which was missing in the original test suite.

### Why are the changes needed?
 The new test verifies that multi-part resolution like mapColumn['key'].nestedField works correctly, we already defined a field `col11MapWithStruct`, but we didn't test it properly.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Unneeded

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

Closes apache#51059 from dengziming/SPARK-52363.

Authored-by: dengziming <dengziming@bytedance.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
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.

3 participants