[fix](orderby)disallow hll and bitmap data type in order by list (#11837)
This commit is contained in:
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user