diff --git a/docs/src/main/sphinx/connector/snowflake.md b/docs/src/main/sphinx/connector/snowflake.md index 99aeb8d8c4e3..5796e59832dd 100644 --- a/docs/src/main/sphinx/connector/snowflake.md +++ b/docs/src/main/sphinx/connector/snowflake.md @@ -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 ``` diff --git a/plugin/trino-snowflake/src/main/java/io/trino/plugin/snowflake/SnowflakeClient.java b/plugin/trino-snowflake/src/main/java/io/trino/plugin/snowflake/SnowflakeClient.java index 08be79ea282b..094a1c139f7f 100644 --- a/plugin/trino-snowflake/src/main/java/io/trino/plugin/snowflake/SnowflakeClient.java +++ b/plugin/trino-snowflake/src/main/java/io/trino/plugin/snowflake/SnowflakeClient.java @@ -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; @@ -161,6 +163,8 @@ public SnowflakeClient( .add(new ImplementAvgFloatingPoint()) .add(new ImplementAvgDecimal()) .add(new ImplementAvgBigint()) + .add(new ImplementStddevSamp()) + .add(new ImplementStddevPop()) .build()); } diff --git a/plugin/trino-snowflake/src/test/java/io/trino/plugin/snowflake/TestSnowflakeConnectorTest.java b/plugin/trino-snowflake/src/test/java/io/trino/plugin/snowflake/TestSnowflakeConnectorTest.java index a49156dc4bdb..50ddd1bcb046 100644 --- a/plugin/trino-snowflake/src/test/java/io/trino/plugin/snowflake/TestSnowflakeConnectorTest.java +++ b/plugin/trino-snowflake/src/test/java/io/trino/plugin/snowflake/TestSnowflakeConnectorTest.java @@ -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,