[chore](Nereids) more reasonable parse select list only query (#31346)

This commit is contained in:
morrySnow
2024-02-27 14:32:12 +08:00
committed by yiguolei
parent f039ec8cfb
commit 378ced72db
3 changed files with 27 additions and 27 deletions

View File

@ -1220,7 +1220,8 @@ public class LogicalPlanBuilder extends DorisParserBaseVisitor<Object> {
if (columnCtx.EXCEPT() != null) {
throw new ParseException("select-except cannot be used in one row relation", selectCtx);
}
relation = withOneRowRelation(columnCtx);
relation = new UnboundOneRowRelation(StatementScopeIdGenerator.newRelationId(),
ImmutableList.of(new UnboundAlias(Literal.of(0))));
} else {
relation = visitFromClause(ctx.fromClause());
}