@@ -788,7 +788,6 @@ func FloatValue(v float32) *floatValue {
788788
789789type int8Value int8
790790
791- //nolint:funlen
792791func (v int8Value ) castTo (dst interface {}) error {
793792 switch vv := dst .(type ) {
794793 case * string :
@@ -804,65 +803,21 @@ func (v int8Value) castTo(dst interface{}) error {
804803
805804 return nil
806805
807- case * uint64 :
808- if v < 0 {
809- return xerrors .WithStackTrace (fmt .Errorf (
810- "%w '%s(%+v)' to '%T' destination" ,
811- ErrCannotCast , v .Type ().Yql (), v , vv ,
812- ))
813- }
814-
815- * vv = uint64 (v )
816-
817- return nil
818806 case * int32 :
819807 * vv = int32 (v )
820808
821809 return nil
822810
823- case * uint32 :
824- if v < 0 {
825- return xerrors .WithStackTrace (fmt .Errorf (
826- "%w '%s(%+v)' to '%T' destination" ,
827- ErrCannotCast , v .Type ().Yql (), v , vv ,
828- ))
829- }
830-
831- * vv = uint32 (v )
832-
833- return nil
834811 case * int16 :
835812 * vv = int16 (v )
836813
837814 return nil
838815
839- case * uint16 :
840- if v < 0 {
841- return xerrors .WithStackTrace (fmt .Errorf (
842- "%w '%s(%+v)' to '%T' destination" ,
843- ErrCannotCast , v .Type ().Yql (), v , vv ,
844- ))
845- }
846-
847- * vv = uint16 (v )
848-
849- return nil
850816 case * int8 :
851817 * vv = int8 (v )
852818
853819 return nil
854820
855- case * uint8 :
856- if v < 0 {
857- return xerrors .WithStackTrace (fmt .Errorf (
858- "%w '%s(%+v)' to '%T' destination" ,
859- ErrCannotCast , v .Type ().Yql (), v , vv ,
860- ))
861- }
862-
863- * vv = uint8 (v )
864-
865- return nil
866821 case * float64 :
867822 * vv = float64 (v )
868823
@@ -965,7 +920,6 @@ func Int16Value(v int16) int16Value {
965920
966921type int32Value int32
967922
968- //nolint:funlen
969923func (v int32Value ) castTo (dst interface {}) error {
970924 switch vv := dst .(type ) {
971925 case * string :
@@ -981,49 +935,16 @@ func (v int32Value) castTo(dst interface{}) error {
981935
982936 return nil
983937
984- case * uint64 :
985- if v < 0 {
986- return xerrors .WithStackTrace (fmt .Errorf (
987- "%w '%s(%+v)' to '%T' destination" ,
988- ErrCannotCast , v .Type ().Yql (), v , vv ,
989- ))
990- }
991-
992- * vv = uint64 (v )
993-
994- return nil
995938 case * int :
996939 * vv = int (v )
997940
998941 return nil
999942
1000- case * uint :
1001- if v < 0 {
1002- return xerrors .WithStackTrace (fmt .Errorf (
1003- "%w '%s(%+v)' to '%T' destination" ,
1004- ErrCannotCast , v .Type ().Yql (), v , vv ,
1005- ))
1006- }
1007-
1008- * vv = uint (v )
1009-
1010- return nil
1011943 case * int32 :
1012944 * vv = int32 (v )
1013945
1014946 return nil
1015947
1016- case * uint32 :
1017- if v < 0 {
1018- return xerrors .WithStackTrace (fmt .Errorf (
1019- "%w '%s(%+v)' to '%T' destination" ,
1020- ErrCannotCast , v .Type ().Yql (), v , vv ,
1021- ))
1022- }
1023-
1024- * vv = uint32 (v )
1025-
1026- return nil
1027948 case * float64 :
1028949 * vv = float64 (v )
1029950
@@ -1079,17 +1000,6 @@ func (v int64Value) castTo(dst interface{}) error {
10791000
10801001 return nil
10811002
1082- case * uint64 :
1083- if v < 0 {
1084- return xerrors .WithStackTrace (fmt .Errorf (
1085- "%w '%s(%+v)' to '%T' destination" ,
1086- ErrCannotCast , v .Type ().Yql (), v , vv ,
1087- ))
1088- }
1089-
1090- * vv = uint64 (v )
1091-
1092- return nil
10931003 case * float64 :
10941004 * vv = float64 (v )
10951005
0 commit comments