ueshin opened a new pull request, #57878:
URL: https://github.com/apache/spark/pull/57878

   ### What changes were proposed in this pull request?
   
   Update `VariantGet.checkDataType` to reject map types whose keys are `CHAR` 
or `VARCHAR`.
   
   Add tests covering `STRING`, `CHAR`, and `VARCHAR` as top-level, array 
element, map key/value, and struct field target types.
   
   ### Why are the changes needed?
   
   `CHAR` and `VARCHAR` extend `StringType`. As a result, the existing 
`MapType(_: StringType, ...)` pattern incorrectly accepts them as map key 
types, even though `VariantGet` explicitly rejects `CHAR` and `VARCHAR`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Variant conversions targeting maps with `CHAR` or `VARCHAR` key types 
are now rejected during analysis. Maps with `STRING` keys remain supported.
   
   ### How was this patch tested?
   
   Updated the related tests.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-5)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to