anshulbaliga7 opened a new pull request, #13677: URL: https://github.com/apache/gluten/pull/13677
## What changes were proposed in this pull request? Velox now resolves duplicate keys in map() and map_from_entries() according to spark.sql.mapKeyDedupPolicy, the way Spark's map builder does, and Gluten offloads both functions. Today only map_from_arrays, transform_keys and str_to_map have a test with a repeated key. map() has none, so a regression there would go unnoticed (see #8716, where map() silently returned the last value under EXCEPTION). This adds one test each for map() and map_from_entries() in ScalarFunctionsValidateSuite. On rows with a repeated key, each test checks that: - the project is offloaded (ProjectExecTransformer); - EXCEPTION raises "Duplicate map key" from the native side; - LAST_WIN matches vanilla Spark, including the order of map_keys. The keys come from a table column, because Spark rejects repeated literal keys while planning, before the query reaches Velox. map_from_entries uses named_struct with identical field names so that all entries have the same struct type. Fixes #8716 ## How was this patch tested? Test-only change. The new tests pass in CI on Spark 3.4, 3.5, 4.0, 4.1 and 4.2. ## Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude claude-sonnet-5-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]
