[Enhancement](metric-type) more readable error message for only metric type #12162

Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
This commit is contained in:
camby
2022-08-31 14:35:48 +08:00
committed by GitHub
parent c2f7e95c7f
commit da4ffd3c56

View File

@ -234,7 +234,7 @@ public class SetOperationStmt extends QueryStmt {
* set operands are set compatible, adding implicit casts if necessary.
*/
@Override
public void analyze(Analyzer analyzer) throws UserException {
public void analyze(Analyzer analyzer) throws AnalysisException, UserException {
if (isAnalyzed()) {
return;
}
@ -292,13 +292,8 @@ public class SetOperationStmt extends QueryStmt {
if (!distinctOperands.isEmpty()) {
// Aggregate produces exactly the same tuple as the original setOp stmt.
ArrayList<Expr> groupingExprs = Expr.cloneList(resultExprs);
try {
distinctAggInfo = AggregateInfo.create(
groupingExprs, null, analyzer.getDescTbl().getTupleDesc(tupleId), analyzer);
} catch (AnalysisException e) {
// Should never happen.
throw new IllegalStateException("Error creating agg info in SetOperationStmt.analyze()", e);
}
distinctAggInfo = AggregateInfo.create(
groupingExprs, null, analyzer.getDescTbl().getTupleDesc(tupleId), analyzer);
}
setOpsResultExprs = Expr.cloneList(resultExprs);