Skip to content

Phase 2: make sort pushdown support exact mode which can support sort elimination when ordering is guaranteed #19329

@zhuqi-lucas

Description

@zhuqi-lucas

Is your feature request related to a problem or challenge?

The phase 1 PR for sort pushdown with inexact mode implementation:
#19064

This ticket we will implement the phase 2:

//! ## Current capabilities (Phase 1)
//!
//! - Reverse scan optimization: when required sort is the reverse of the data source's
//!   natural ordering, enable reverse scanning (reading row groups in reverse order)
//! - Supports prefix matching: if data has ordering [A DESC, B ASC] and query needs
//!   [A ASC], reversing gives [A ASC, B DESC] which satisfies the requirement
//!
//! ## Future enhancements (Phase 2)
//!
//! - File reordering based on statistics
//! - Return `Exact` when files are known to be perfectly sorted
//! - Complete Sort elimination when ordering is guaranteed

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions