Skip to content

feat: Add explain support for lance#43

Merged
Xuanwo merged 2 commits intomainfrom
xuanwo/add-explain
Dec 24, 2025
Merged

feat: Add explain support for lance#43
Xuanwo merged 2 commits intomainfrom
xuanwo/add-explain

Conversation

@Xuanwo
Copy link
Copy Markdown
Collaborator

@Xuanwo Xuanwo commented Dec 24, 2025

This PR will add explain support for lance

D EXPLAIN (format json)  SELECT count(*) FROM 'test/test_data.lance' WHERE age > 30;

┌─────────────────────────────┐
│┌───────────────────────────┐│
││       Physical Plan       ││
│└───────────────────────────┘│
└─────────────────────────────┘
[
    {
        "name": "UNGROUPED_AGGREGATE",
        "children": [
            {
                "name": "LANCE_SCAN ",
                "children": [],
                "extra_info": {
                    "Lance Path": "test/test_data.lance",
                    "Lance Explain Verbose": "false",
                    "Lance Pushed Filter Parts": "1",
                    "Lance Filter IR Bytes (Bind)": "37",
                    "Lance Plan (Bind)": [
                        "ProjectionExec: expr=[id@0 as id, name@4 as name, age@1 as age, score@2 as score]",
                        "  Take: columns=\"id, age, score, _rowid, (name)\"",
                        "    CoalesceBatchesExec: target_batch_size=8192",
                        "      LanceRead: uri=Users/xuanwo/conductor/workspaces/lance-duckdb/riga/test/test_data.lance/data, projection=[id, age, score], num_fragments=1, range_before=None, range_after=None, row_id=true, row_addr=false, full_filter=age > Int64(30), refine_filter=age > Int64(30)"
                    ],
                    "Projections": "",
                    "Filters": "age>30",
                    "Estimated Cardinality": "1"
                }
            }
        ],
        "extra_info": {
            "Aggregates": "count_star()"
        }
    }
]

Parts of this PR were drafted with assistance from Codex (with gpt-5.2) and fully reviewed and edited by me. I take full responsibility for all changes.

@Xuanwo Xuanwo merged commit 67e3102 into main Dec 24, 2025
5 checks passed
@Xuanwo Xuanwo deleted the xuanwo/add-explain branch December 24, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant