Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
XuHuaiyu committed Apr 9, 2020
1 parent 56dea09 commit ef229ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion executor/aggregate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ func (s *testSuite) TestIssue13652(c *C) {
tk.MustQuery("select a from t group by +a")
tk.MustQuery("select a from t group by ((+a))")
_, err := tk.Exec("select a from t group by (-a)")
c.Assert(err.Error(), Equals, "[planner:1055]Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test.t.a' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by")
c.Assert(err.Error(), Equals, "[planner:1055]Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'a' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by")
}

func (s *testSuite) TestHaving(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion planner/core/logical_plan_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ func (b *planBuilder) checkOnlyFullGroupByWithGroupClause(p LogicalPlan, sel *as
gbyExprs := make([]ast.ExprNode, 0, len(sel.Fields.Fields))
schema := p.Schema()
for _, byItem := range sel.GroupBy.Items {
expr := getInnerFromParentheses(byItem.Expr)
expr := getInnerFromParenthesesAndUnaryPlus(byItem.Expr)
if colExpr, ok := expr.(*ast.ColumnNameExpr); ok {
col, err := schema.FindColumn(colExpr.Name)
if err != nil || col == nil {
Expand Down

0 comments on commit ef229ba

Please sign in to comment.