Skip to content

[C++][Python] Binary search for sorted tables. #34153

Open

Description

@coady

Describe the enhancement requested

While I support the decision for tables to not have index columns, I have still found it useful to enable fast binary search when it's known that a table is sorted. Currently I'm using schema.pandas_metadata['index_columns'] to detect sorting. It would be nice if arrow had it own metadata standard, instead of a pandas dependency.

The feature could go through stages:

  1. define and document metadata standard
  2. Table.sort_by adds the metadata
  3. a binary search compute function is added

Component(s)

C++, Python

Activity

  1. westonpace commented on Mar 2, 2023

    @westonpace
    Member

    Just for clarity, is the ask for a metadata standard for sortedness? Or is it for a binary search method? Or both?

  2. coady commented on Mar 3, 2023

    @coady
    Author

    Just for clarity, is the ask for a metadata standard for sortedness? Or is it for a binary search method? Or both?

    Both.

  3. westonpace commented on Mar 3, 2023

    @westonpace
    Member

    Can you create a separate issue for the IPC metadata. This has come up in the past. I suspect most people just store their own internal metadata to represent this. However, it would be good to standardize (and datasets is very close to being able to tack advantage of this information).

  4. added
    Status: stale-warningIssues and PRs flagged as stale which are due to be closed if no indication otherwise
    on Feb 18, 2026
  5. thisisnic commented on Feb 18, 2026

    @thisisnic
    Member

    This issue has been marked as stale because it has had no activity in the past 2 years. Please remove the stale label or comment below, or this issue will be closed in 14 days.

  6. removed
    Status: stale-warningIssues and PRs flagged as stale which are due to be closed if no indication otherwise
    on May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions