Skip to content

Commit

Permalink
fix: count(*) 在表头输出带星号
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosthi committed Sep 29, 2024
1 parent 7753a87 commit 8ae4d29
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/observer/sql/parser/expression_binder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@ RC ExpressionBinder::bind_aggregate_expression(
if (child_expr->type() == ExprType::STAR && aggregate_type == AggregateExpr::Type::COUNT) {
ValueExpr *value_expr = new ValueExpr(Value(1));
child_expr.reset(value_expr);
// count(*) 输出星号
child_expr->set_name("*");
} else {
rc = bind_expression(child_expr, child_bound_expressions);
if (OB_FAIL(rc)) {
Expand Down

0 comments on commit 8ae4d29

Please sign in to comment.