diff --git a/pkg/expression/builtin_cast.go b/pkg/expression/builtin_cast.go index 6c6324af3b37d..45e3589f86c17 100644 --- a/pkg/expression/builtin_cast.go +++ b/pkg/expression/builtin_cast.go @@ -455,7 +455,7 @@ func (c *castAsArrayFunctionClass) getFunction(ctx BuildContext, args []Expressi return nil, ErrNotSupportedYet.GenWithStackByArgs("specifying charset for multi-valued index") } if arrayType.EvalType() == types.ETString && arrayType.GetFlen() == types.UnspecifiedLength { - return nil, ErrNotSupportedYet.GenWithStackByArgs("CAST-ing data to array of char/binary BLOBs") + return nil, ErrNotSupportedYet.GenWithStackByArgs("CAST-ing data to array of char/binary BLOBs with unspecified length") } bf, err := newBaseBuiltinFunc(ctx, c.funcName, args, c.tp) diff --git a/tests/integrationtest/r/expression/multi_valued_index.result b/tests/integrationtest/r/expression/multi_valued_index.result index 996b530da5a6e..52d40e6c115e4 100644 --- a/tests/integrationtest/r/expression/multi_valued_index.result +++ b/tests/integrationtest/r/expression/multi_valued_index.result @@ -28,9 +28,9 @@ Error 1235 (42000): This version of TiDB doesn't yet support 'Use of CAST( .. AS create table t(j json, gc json as (cast(j->'$[*]' as unsigned array))); Error 1235 (42000): This version of TiDB doesn't yet support 'Use of CAST( .. AS .. ARRAY) outside of functional index in CREATE(non-SELECT)/ALTER TABLE or in general expressions' create table t1(j json, key i1((cast(j->"$" as char array)))); -Error 1235 (42000): This version of TiDB doesn't yet support 'CAST-ing data to array of char/binary BLOBs' +Error 1235 (42000): This version of TiDB doesn't yet support 'CAST-ing data to array of char/binary BLOBs with unspecified length' create table t1(j json, key i1((cast(j->"$" as binary array)))); -Error 1235 (42000): This version of TiDB doesn't yet support 'CAST-ing data to array of char/binary BLOBs' +Error 1235 (42000): This version of TiDB doesn't yet support 'CAST-ing data to array of char/binary BLOBs with unspecified length' create table t1(j json, key i1((cast(j->"$" as float array)))); Error 1235 (42000): This version of TiDB doesn't yet support 'CAST-ing data to array of float BINARY' create table t1(j json, key i1((cast(j->"$" as decimal(4,2) array))));