Skip to content

Commit 001f0f1

Browse files
committed
fix conflict
Signed-off-by: Yang Keao <[email protected]>
1 parent eec9ac4 commit 001f0f1

File tree

8 files changed

+13
-6795
lines changed

8 files changed

+13
-6795
lines changed

expression/integration_test/integration_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8064,3 +8064,15 @@ func TestCastBinaryStringToJSON(t *testing.T) {
80648064
tk.MustQuery("select 1 from t where cast(BINARY vc as json) = '1';").Check(testkit.Rows())
80658065
tk.MustQuery("select 1 from t where cast(BINARY c as json) = '1';").Check(testkit.Rows())
80668066
}
8067+
8068+
func TestIssue53580(t *testing.T) {
8069+
store := testkit.CreateMockStore(t)
8070+
tk := testkit.NewTestKit(t, store)
8071+
8072+
tk.MustExec("use test")
8073+
tk.MustExec("create table t (col TEXT);")
8074+
tk.MustQuery(`select 1 from (select t.col as c0, 46578369 as c1 from t) as t where
8075+
case when (
8076+
t.c0 in (t.c0, cast((cast(1 as unsigned) - cast(t.c1 as signed)) as char))
8077+
) then 1 else 2 end;`).Check(testkit.Rows())
8078+
}

expression/util.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,15 +512,11 @@ func ColumnSubstituteImpl(expr Expression, schema *Schema, newExprs []Expression
512512
}
513513
}
514514
if substituted {
515-
<<<<<<< HEAD:expression/util.go
516-
return true, hasFail, NewFunctionInternal(v.GetCtx(), v.FuncName.L, v.RetType, refExprArr.Result()...)
517-
=======
518-
newFunc, err := NewFunction(ctx, v.FuncName.L, v.RetType, refExprArr.Result()...)
515+
newFunc, err := NewFunction(v.GetCtx(), v.FuncName.L, v.RetType, refExprArr.Result()...)
519516
if err != nil {
520517
return true, true, v
521518
}
522519
return true, hasFail, newFunc
523-
>>>>>>> 3d68bd21240 (expression: fail `ColumnSubstituteImpl` if creating function returns error (#53716)):pkg/expression/util.go
524520
}
525521
}
526522
return false, false, expr

tests/integrationtest/r/ddl/db_rename.result

Lines changed: 0 additions & 27 deletions
This file was deleted.

tests/integrationtest/r/expression/cast.result

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)