Skip to content

Fix str_to_map MAP_KEY_DEDUP_POLICY comparison for Spark 4.1 compatibility #12034

@surendralilhore

Description

@surendralilhore

Backend

VL (Velox)

Bug description

Starting from Spark 4.1, SQLConf.get.getConf(SQLConf.MAP_KEY_DEDUP_POLICY) returns an enum value instead of a String. The existing comparison against the .toString of the EXCEPTION variant would always evaluate to not-equal (comparing enum != String), incorrectly rejecting str_to_map offloading even when the policy is set to EXCEPTION.

Add .toString on the left side so both operands are compared as Strings, restoring correct behavior across all Spark versions.

Gluten version

main branch

Spark version

spark-4.0.x

Spark configurations

No response

System information

No response

Relevant logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions