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

count(*) get extra column #200

Closed
st1page opened this issue Dec 1, 2021 · 1 comment
Closed

count(*) get extra column #200

st1page opened this issue Dec 1, 2021 · 1 comment
Assignees

Comments

@st1page
Copy link
Collaborator

st1page commented Dec 1, 2021

> create table t1(v1 int, v2 int);
> create table t2(v3 int, v4 int);
> explain select count(*) from t1 join t2 on v2=v3; 
+------------------------------------------------------------------------------------+
| Projection: exprs [#0]                                                             |
|   SimpleAgg: [RowCount([#1]) -> Int(None)]                                         |
|     Join: type NestedLoop                                                          |
|       SeqScan: table #0, columns [1, 0], with_row_handler: false, is_sorted: false |
|       SeqScan: table #1, columns [0], with_row_handler: false, is_sorted: false    |
+------------------------------------------------------------------------------------+
@xxchan
Copy link
Member

xxchan commented Feb 19, 2022

fixed now

> explain select count(*) from t1 join t2 on v2=v3; 
PhysicalProjection: exprs [InputRef #0]
  PhysicalSimpleAgg: 1 agg calls
    PhysicalHashJoin: op Inner, predicate: Eq(InputRef #0, InputRef #1) 
      PhysicalTableScan: table #11, columns [1], with_row_handler: false, is_sorted: false, expr: None
      PhysicalTableScan: table #12, columns [0], with_row_handler: false, is_sorted: false, expr: None

@xxchan xxchan closed this as completed Feb 19, 2022
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

3 participants