diff --git a/expression/builtin_cast.go b/expression/builtin_cast.go index 7b18050e3bd16..256b1bcea5fea 100644 --- a/expression/builtin_cast.go +++ b/expression/builtin_cast.go @@ -1883,12 +1883,9 @@ func WrapWithCastAsDecimal(ctx sessionctx.Context, expr Expression) Expression { if expr.GetType().EvalType() == types.ETInt { tp.Flen = mysql.MaxIntWidth } -<<<<<<< HEAD -======= if tp.Flen == types.UnspecifiedLength || tp.Flen > mysql.MaxDecimalWidth { tp.Flen = mysql.MaxDecimalWidth } ->>>>>>> a18e05d2f... expression: limit valid decimal length (#28466) types.SetBinChsClnFlag(tp) tp.Flag |= expr.GetType().Flag & mysql.UnsignedFlag return BuildCastFunction(ctx, expr, tp) diff --git a/planner/core/testdata/integration_serial_suite_out.json b/planner/core/testdata/integration_serial_suite_out.json index d1ce2e8ea8701..c54a5250592ab 100644 --- a/planner/core/testdata/integration_serial_suite_out.json +++ b/planner/core/testdata/integration_serial_suite_out.json @@ -1851,15 +1851,9 @@ " └─Projection 8000.00 batchCop[tiflash] div(Column#5, cast(case(eq(Column#20, 0), 1, Column#20), decimal(20,0) BINARY))->Column#5, test.t.id", " └─HashAgg 8000.00 batchCop[tiflash] group by:test.t.id, funcs:sum(Column#21)->Column#20, funcs:sum(Column#22)->Column#5, funcs:firstrow(test.t.id)->test.t.id", " └─ExchangeReceiver 8000.00 batchCop[tiflash] ", -<<<<<<< HEAD " └─ExchangeSender 8000.00 batchCop[tiflash] ExchangeType: HashPartition, Hash Cols: test.t.id", - " └─HashAgg 8000.00 batchCop[tiflash] group by:Column#25, funcs:count(Column#23)->Column#20, funcs:sum(Column#24)->Column#21", - " └─Projection 10000.00 batchCop[tiflash] plus(test.t.value, 2)->Column#23, plus(test.t.value, 2)->Column#24, test.t.id", -======= - " └─ExchangeSender 8000.00 batchCop[tiflash] ExchangeType: HashPartition, Hash Cols: [name: test.t.id, collate: N/A]", " └─HashAgg 8000.00 batchCop[tiflash] group by:Column#26, funcs:count(Column#24)->Column#21, funcs:sum(Column#25)->Column#22", " └─Projection 10000.00 batchCop[tiflash] plus(test.t.value, 2)->Column#24, plus(test.t.value, 2)->Column#25, test.t.id", ->>>>>>> a18e05d2f... expression: limit valid decimal length (#28466) " └─TableFullScan 10000.00 batchCop[tiflash] table:t keep order:false, stats:pseudo" ] },