Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show table name in delta_scan #117

Open
djouallah opened this issue Nov 12, 2024 · 1 comment
Open

show table name in delta_scan #117

djouallah opened this issue Nov 12, 2024 · 1 comment

Comments

@djouallah
Copy link

it will be nice to show the view/table name when scanning delta

image

@samansmink
Copy link
Collaborator

Great idea, this is pretty straightforward. I've a PR up in duckdb that enables this. We can also look into printing other stuff like the table version and maybe even the partitioning of the table

Mytherin added a commit to duckdb/duckdb that referenced this issue Nov 18, 2024
Follow up of #13109.

This PR extends the aforementioned by allowing the
TableFunction::to_string method to also return a map instead of a raw
string. This allows TableFunctions to return structured information for
the explain output.

Additionally, this PR reworks the parameters to the `to_string` function
to also take a reference to the table function. This is required for the
new delta attach functionality to be able to deduce which table is being
scanned.

With these two things the delta extension can make its explain output
for scanning attached tables a lot prettier by showing the name of the
table scanned (thanks @djouallah for this suggestion
duckdb/duckdb-delta#117):

```
┌─────────────────────────────┐
│┌───────────────────────────┐│
││       Physical Plan       ││
│└───────────────────────────┘│
└─────────────────────────────┘
┌───────────────────────────┐
│           UNION           ├──────────────┐
└─────────────┬─────────────┘              │
┌─────────────┴─────────────┐┌─────────────┴─────────────┐
│        DELTA_SCAN         ││        DELTA_SCAN         │
│    ────────────────────   ││    ────────────────────   │
│         Table: dt1        ││         Table: dt2        │
│    Projections: c_name    ││    Projections: c_name    │
│                           ││                           │
│        ~150000 Rows       ││        ~150000 Rows       │
└───────────────────────────┘└───────────────────────────┘
```
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

No branches or pull requests

2 participants