fix direct load cast number with scale < 0

This commit is contained in:
obdev 2024-09-18 06:47:48 +00:00 committed by ob-robot
parent 23638d1dd8
commit 9876e25006
2 changed files with 11 additions and 1 deletions

View File

@ -357,7 +357,8 @@ int ObTableLoadObjCaster::to_type(const ObObjType &expect_type, const share::sch
if (src.is_null()) {
dst.set_null();
} else if (src.get_type_class() == ObStringTC &&
(expect_type == ObNumberType || expect_type == ObUNumberType)) {
(expect_type == ObNumberType || expect_type == ObUNumberType) &&
accuracy.get_scale() >= 0) {
ObNumberDesc d(0);
uint32_t *digits = nullptr;
cast_obj_ctx.number_fast_ctx_.reset();

View File

@ -0,0 +1,9 @@
11111
22222
33333
44444
55555
66666
77777
88888
99999
1 11111
2 22222
3 33333
4 44444
5 55555
6 66666
7 77777
8 88888
9 99999