diff --git a/sql/server/build.gradle b/sql/server/build.gradle index 0e7b46dd1ad..64e2050b8d5 100644 --- a/sql/server/build.gradle +++ b/sql/server/build.gradle @@ -4,7 +4,6 @@ dependencies { compile project(':x-pack-elasticsearch:sql:jdbc-proto') compile project(':x-pack-elasticsearch:sql:cli-proto') compile project(':x-pack-elasticsearch:sql:shared-proto') - provided "org.elasticsearch.plugin:aggs-matrix-stats-client:${project.versions.elasticsearch}" compile 'org.antlr:antlr4-runtime:4.5.3' provided "org.elasticsearch:elasticsearch:${project.versions.elasticsearch}" diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/querydsl/agg/MatrixStatsAgg.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/querydsl/agg/MatrixStatsAgg.java index e72ad870e16..271bb542feb 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/querydsl/agg/MatrixStatsAgg.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/querydsl/agg/MatrixStatsAgg.java @@ -6,10 +6,9 @@ package org.elasticsearch.xpack.sql.querydsl.agg; import java.util.List; - +import org.elasticsearch.rest.RestStatus; import org.elasticsearch.search.aggregations.AggregationBuilder; - -import static org.elasticsearch.search.aggregations.MatrixStatsAggregationBuilders.matrixStats; +import org.elasticsearch.xpack.sql.planner.PlanningException; public class MatrixStatsAgg extends LeafAgg { @@ -18,10 +17,11 @@ public class MatrixStatsAgg extends LeafAgg { public MatrixStatsAgg(String id, String propertyPath, List fields) { super(id, propertyPath, ""); this.fields = fields; + throw new PlanningException("innerkey/matrix stats not handled (yet)", RestStatus.BAD_REQUEST); } @Override AggregationBuilder toBuilder() { - return matrixStats(id()).fields(fields); + throw new UnsupportedOperationException(); } }