Skip to content

fix(python): accept column names in default scan ordering - #11408

Open
zhangyue19921010 wants to merge 1 commit into
lance-format:mainfrom
zhangyue19921010:fix/python-default-scan-ordering
Open

zhangyue19921010 wants to merge 1 commit into
lance-format:mainfrom
zhangyue19921010:fix/python-default-scan-ordering

Conversation

@zhangyue19921010

Copy link
Copy Markdown
Collaborator

Problem

An order_by list of column names works when passed to scanner() and
raises TypeError when passed through default_scan_options.

Solution

Normalize column names in the shared scanner builder so both paths use
the same ordering conversion. Reject a bare string before iterating the
sort keys.

Result

Column names and ColumnOrdering defaults work across fragments. An
explicit ordering overrides the default, and an empty list clears it.

The dataset test suite and Python lint passed.

Fixes #11407

Problem
An order_by list of column names works for an explicit scan and raises
TypeError when set through the dataset's default scan options.

Solution
Normalize column names in the scanner builder so both paths use the
same ordering conversion.

Result
String and object defaults sort across fragments. Scans can override
the default ordering or clear it with an empty list.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added A-python Python bindings bug Something isn't working labels Nov 23, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Gate recommendation: approve.

No blocking issues found. The ordering regressions and multi-fragment probes passed, including default ordering, explicit overrides, clearing, and null handling.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-python Python bindings bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: column names in default scan ordering raise TypeError

1 participant