Skip to content

fix: tree-style explain for memory table shows wrong row count - #24511

Merged
Dandandan merged 2 commits into
apache:mainfrom
2010YOUY01:fix-tree-explain-memtable
Aug 20, 2026
Merged

fix: tree-style explain for memory table shows wrong row count#24511
Dandandan merged 2 commits into
apache:mainfrom
2010YOUY01:fix-tree-explain-memtable

Conversation

@2010YOUY01

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

See reproducer in datafusion-cli, the rows:1 line in the explain is the wrong result, it should be total rows for the memory table (101)

yongting@Yongtings-MacBook-Pro-2 ~/C/datafusion (main>)> datafusion-cli
DataFusion CLI v54.1.0
> create table test_memtable as
select *
from generate_series(100);
0 row(s) fetched.
Elapsed 0.004 seconds.

> explain format tree select * from test_memtable;
+---------------+-------------------------------+
| plan_type     | plan                          |
+---------------+-------------------------------+
| physical_plan | ┌───────────────────────────┐ |
|               | │       DataSourceExec      │ |
|               | │    --------------------   │ |
|               | │        bytes: 65632       │ |
|               | │       format: memory      │ |
|               | │          rows: 1          │ |
|               | └───────────────────────────┘ |
|               |                               |
+---------------+-------------------------------+
1 row(s) fetched.
Elapsed 0.001 seconds.

What changes are included in this PR?

fix the explain for row count

Are these changes tested?

sqllogictest

Are there any user-facing changes?

@github-actions github-actions Bot added sqllogictest SQL Logic Tests (.slt) datasource Changes to the datasource crate auto detected api change Auto detected API change labels Aug 20, 2026
arrow_cast(column4, 'FixedSizeList(3, Float64)') AS column4
FROM arrays_distance_table
;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Those small formatting changes are enforced by cargo test --test sqllogictests -- --complete

We can keep them here, and future auto-fixes won't need to change again.

@apache apache deleted a comment from github-actions Bot Aug 20, 2026
@2010YOUY01 2010YOUY01 removed the auto detected api change Auto detected API change label Aug 20, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.27%. Comparing base (f1f0449) to head (d75e726).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24511      +/-   ##
==========================================
- Coverage   81.27%   81.27%   -0.01%     
==========================================
  Files        1116     1116              
  Lines      395017   395078      +61     
  Branches   395017   395078      +61     
==========================================
+ Hits       321055   321101      +46     
- Misses      55166    55179      +13     
- Partials    18796    18798       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nuno-faria nuno-faria 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.

Thanks @2010YOUY01.

@Dandandan
Dandandan added this pull request to the merge queue Aug 20, 2026
Merged via the queue into apache:main with commit 10077e8 Aug 20, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

datasource Changes to the datasource crate sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants