这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@rakeshkky
Copy link
Member

Description

What component does this PR affect?

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System

Requires changes from other components? If yes, please mark the components:

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System

Related Issue

close #1028

Solution and Design

  • Support statistical aggregate operations like stddev, stddev_pop, variance and var_pop
  • Support COUNT on columns (also using DISTINCT) via arguments to count field
    Ex:- count(columns: [id, author_id], distinct: true)

Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs update
  • Community content

Checklist:

  • I have read the contributing guide and my code conforms to the guidelines.
  • This change requires a change in the documentation.
  • I have updated the documentation accordingly.
  • I have added required tests.

@rakeshkky rakeshkky added s/ok-to-merge Status: This pull request can be merged to master c/server Related to server labels Nov 13, 2018
@rakeshkky rakeshkky self-assigned this Nov 13, 2018
@rakeshkky rakeshkky requested a review from 0x777 November 13, 2018 14:21
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-1029.herokuapp.com

0x777
0x777 previously approved these changes Nov 13, 2018
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-1029.herokuapp.com

@shahidhk shahidhk added the c/docs Related to docs label Nov 14, 2018
@shahidhk
Copy link
Member

@rakeshkky Can you also add relevant docs?

@0x777
Copy link
Member

0x777 commented Nov 14, 2018

@rakeshkky Can you also add, stddev_samp and var_samp for completeness.

@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-1029.herokuapp.com

@rakeshkky
Copy link
Member Author

@rakeshkky Can you also add relevant docs?

Updated #991 PR

@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-1029.herokuapp.com

@0x777 0x777 merged commit b719e82 into hasura:master Nov 14, 2018
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-1029.herokuapp.com is deleted

hasura-bot pushed a commit that referenced this pull request Aug 29, 2024
<!-- The PR description should answer 2 important questions: -->

### What

- Adds datafusion row metrics to our NDC query and aggregate nodes, for
explain output
- Aggregates all datafusion metrics in the trace attributes:
- `rows_processed`, i.e. total number of rows considered over all
execution plan nodes
- `elapsed_compute`, i.e. CPU time spent in _processing_ data (not
fetching it)
- Adds the explain output to the `create_logical_plan` span.

E.g. a query we don't push down to NDC:

```sql
SELECT
    COUNT(42 * invoiceId) AS odd_count
FROM
    InvoiceLine;
```

Attributes:

```text
rows_processed: 2242
total_rows: 1
elapsed_compute: 417
logical_plan: Projection: count(Int64(42) * InvoiceLine.invoiceId) AS odd_count
  Aggregate: groupBy=[[]], aggr=[[count(Int64(42) * InvoiceLine.invoiceId)]]
    TableScan: InvoiceLine
```

The metrics clearly indicate that the cost in terms of rows processed
per row returned (2242 / 1) is very high in this case. The logical plan
makes it clear why this was the case: we failed to push down the
aggregate node.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: c26cce9adab9d0feb0a7d2873a3eea38542564a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/docs Related to docs c/server Related to server s/ok-to-merge Status: This pull request can be merged to master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add statistical aggregate operations and count on columns

4 participants