Skip to content

[VL] Strip default comparator from array_sort for Velox offloading #12094

@surendralilhore

Description

@surendralilhore

Backend

VL (Velox)

Bug description

When Spark's array_sort is called without an explicit comparator (the default ascending sort), Spark internally
generates a LambdaFunction that wraps the simple ascending comparison in null-handling If/IsNull logic. Velox's
rewriteArraySortCall uses a SimpleComparisonMatcher that cannot parse this null-handling wrapper, causing the
expression to fall back to Vanilla Spark.

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