[fix](orderby)disallow hll and bitmap data type in order by list (#11837)

This commit is contained in:
starocean999
2022-08-18 14:50:25 +08:00
committed by GitHub
parent 1da39771e3
commit 066bc7693e
2 changed files with 17 additions and 0 deletions

View File

@ -21,6 +21,7 @@
package org.apache.doris.analysis;
import org.apache.doris.catalog.TableIf;
import org.apache.doris.catalog.Type;
import org.apache.doris.common.AnalysisException;
import org.apache.doris.common.ErrorCode;
import org.apache.doris.common.ErrorReport;
@ -318,6 +319,12 @@ public abstract class QueryStmt extends StatementBase implements Queriable {
+ " 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.