From 119a05df0703152d56440f2a8fea9d5f1b2b071c Mon Sep 17 00:00:00 2001 From: Zhi Qi Date: Tue, 28 Jun 2022 01:28:44 +0800 Subject: [PATCH] lint --- expression/expression_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/expression/expression_test.go b/expression/expression_test.go index 70d1e2523f1c3..00a2c1bee360c 100644 --- a/expression/expression_test.go +++ b/expression/expression_test.go @@ -84,15 +84,15 @@ func TestEvaluateExprWithNullNoChangeRetType(t *testing.T) { tblInfo := newTestTableBuilder("").add("col_str", mysql.TypeString, 0).build() schema := tableInfoToSchemaForTest(tblInfo) - castStrAsJson := BuildCastFunction(ctx, schema.Columns[0], types.NewFieldType(mysql.TypeJSON)) + castStrAsJSON := BuildCastFunction(ctx, schema.Columns[0], types.NewFieldType(mysql.TypeJSON)) jsonConstant := &Constant{Value: types.NewDatum("123"), RetType: types.NewFieldType(mysql.TypeJSON)} // initially has ParseToJSONFlag - flagInCast := castStrAsJson.(*ScalarFunction).RetType.GetFlag() + flagInCast := castStrAsJSON.(*ScalarFunction).RetType.GetFlag() require.True(t, mysql.HasParseToJSONFlag(flagInCast)) // cast's ParseToJSONFlag removed by `DisableParseJSONFlag4Expr` - eq, err := newFunctionForTest(ctx, ast.EQ, jsonConstant, castStrAsJson) + eq, err := newFunctionForTest(ctx, ast.EQ, jsonConstant, castStrAsJSON) require.NoError(t, err) flagInCast = eq.(*ScalarFunction).GetArgs()[1].(*ScalarFunction).RetType.GetFlag() require.False(t, mysql.HasParseToJSONFlag(flagInCast))