This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch dev-1.1.2 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push: new a8a0bd3f93 [fix](orderby)disallow hll and bitmap data type in order by list (#11837) a8a0bd3f93 is described below commit a8a0bd3f932ee1241d4e2d5b9fa9d2bcdf6cae28 Author: starocean999 <40539150+starocean...@users.noreply.github.com> AuthorDate: Thu Aug 18 14:50:25 2022 +0800 [fix](orderby)disallow hll and bitmap data type in order by list (#11837) --- .../src/main/java/org/apache/doris/analysis/QueryStmt.java | 7 +++++++ .../query/aggregate/aggregate_group_by_hll_and_bitmap.groovy | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/QueryStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/QueryStmt.java index 1617ec4aeb..8a0862f0a8 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/QueryStmt.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/QueryStmt.java @@ -18,6 +18,7 @@ package org.apache.doris.analysis; import org.apache.doris.catalog.Table; +import org.apache.doris.catalog.Type; import org.apache.doris.common.AnalysisException; import org.apache.doris.common.ErrorCode; import org.apache.doris.common.ErrorReport; @@ -310,6 +311,12 @@ public abstract class QueryStmt extends StatementBase { " in nested queries."); } + for (Expr expr : orderingExprs) { + if (expr.getType().isOnlyMetricType()) { + throw new AnalysisException(Type.OnlyMetricTypeErrorMsg); + } + } + sortInfo = new SortInfo(orderingExprs, isAscOrder, nullsFirstParams); // order by w/o limit and offset in inline views, set operands and insert statements // are ignored. diff --git a/regression-test/suites/query/aggregate/aggregate_group_by_hll_and_bitmap.groovy b/regression-test/suites/query/aggregate/aggregate_group_by_hll_and_bitmap.groovy index be00387ef8..dff2b797c7 100644 --- a/regression-test/suites/query/aggregate/aggregate_group_by_hll_and_bitmap.groovy +++ b/regression-test/suites/query/aggregate/aggregate_group_by_hll_and_bitmap.groovy @@ -35,5 +35,15 @@ suite("aggregate_group_by_hll_and_bitmap") { exception "Doris hll and bitmap column must use with specific function, and don't support filter or group by.please run 'help hll' or 'help bitmap' in your mysql client" } + test { + sql "select user_ids from test_group_by_hll_and_bitmap order by user_ids" + exception "Doris hll and bitmap column must use with specific function, and don't support filter or group by.please run 'help hll' or 'help bitmap' in your mysql client" + } + + test { + sql "select hll_set from test_group_by_hll_and_bitmap order by hll_set" + exception "Doris hll and bitmap column must use with specific function, and don't support filter or group by.please run 'help hll' or 'help bitmap' in your mysql client" + } + sql "DROP TABLE test_group_by_hll_and_bitmap" } \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org