COUNT(*) Warning breaking Pushdown queries
- Dominant language
- Rust
- Stars
- 20.8k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 181
Description
**Describe the bug**
A clear and concise description of what the bug is.
Since this [PR](https://github.com/cube-js/cube/pull/8667) has been merged - querying in the BI tool to check counts results in an error rather than getting a count. With pushdown enabled - i wouldn't have anticipated this would be the expected flow if a _count_ measure didn't exist.
---
If this is the expected outcome, then feel free to close!
```javascript
cube(`Orders`, {
sql: `
select 1 as id, 100 as amount, 'new' status
UNION ALL
select 2 as id, 200 as amount, 'new' status
UNION ALL
select 3 as id, 300 as amount, 'processed' status
UNION ALL
select 4 as id, 500 as amount, 'processed' status
UNION ALL
select 5 as id, 600 as amount, 'shipped' status
`,
measures: {
count: {
type: `count`,
public: false
},
totalAmount: {
sql: `amount`,
type: `sum`,
},
toRemove: {
type: `count`,
},
},
dimensions: {
status: {
sql: `status`,
type: `string`,
},
},
});
view(`orders_view`, {
cubes: [
{
join_path: Orders,
prefix: true,
includes: `*`
},
}
```
---
When doing a select count(*) on the orders_View it will error out..
Contributor guide
Assessment
This issue has not been assessed yet.