Skip to content

[Performance] Native SortExec ~8x slower than Spark for single-column integer keys (TPC-H Q21 lineitem) #2405

Description

@yew1eb

In TPC-H Q21 (SF=10, lineitem = 59,986,052 rows), the right side of the lineitem SortMergeJoin is sorted on the single-column integer key l_orderkey (Int64). The Auron native SortExec is ~8x slower than Spark's native sort on this path, because it degrades a single-column integer sort into a generic byte-comparison sort.

Root cause

Implementation Sort approach Single-column Int64 handling
Spark SortExec prefix + radix sort (O(n)) radix sort on 8-byte prefix
Auron SortExec generic external sort RowConverter encodes Int64 into 9 bytes (1B null + 8B big-endian, sign-flipped), then byte-compares

Auron NativeSort time : 13.8s
Image

Spark Sort time: 1.6s
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions