Skip to content

Commit

Permalink
Support stddev, stddev_pop pushdown for Snowflake
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjian2664 authored and ebyhr committed Apr 1, 2024
1 parent 4c62212 commit 809722e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/src/main/sphinx/connector/snowflake.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ The connector supports pushdown for a number of operations:
- {func}`max`
- {func}`min`
- {func}`sum`
- {func}`stddev`
- {func}`stddev_pop`
- {func}`stddev_samp`

```{include} pushdown-correctness-behavior.fragment
```
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
import io.trino.plugin.jdbc.aggregation.ImplementCountAll;
import io.trino.plugin.jdbc.aggregation.ImplementCountDistinct;
import io.trino.plugin.jdbc.aggregation.ImplementMinMax;
import io.trino.plugin.jdbc.aggregation.ImplementStddevPop;
import io.trino.plugin.jdbc.aggregation.ImplementStddevSamp;
import io.trino.plugin.jdbc.aggregation.ImplementSum;
import io.trino.plugin.jdbc.expression.JdbcConnectorExpressionRewriterBuilder;
import io.trino.plugin.jdbc.expression.ParameterizedExpression;
Expand Down Expand Up @@ -161,6 +163,8 @@ public SnowflakeClient(
.add(new ImplementAvgFloatingPoint())
.add(new ImplementAvgDecimal())
.add(new ImplementAvgBigint())
.add(new ImplementStddevSamp())
.add(new ImplementStddevPop())
.build());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ protected boolean hasBehavior(TestingConnectorBehavior connectorBehavior)
SUPPORTS_AGGREGATION_PUSHDOWN_CORRELATION,
SUPPORTS_AGGREGATION_PUSHDOWN_COVARIANCE,
SUPPORTS_AGGREGATION_PUSHDOWN_REGRESSION,
SUPPORTS_AGGREGATION_PUSHDOWN_STDDEV,
SUPPORTS_AGGREGATION_PUSHDOWN_VARIANCE,
SUPPORTS_ARRAY,
SUPPORTS_COMMENT_ON_COLUMN,
Expand Down

0 comments on commit 809722e

Please sign in to comment.