[TD-14575]<fix>: fix rtrim result not correct for nchar columns

This commit is contained in:
Ganlin Zhao 2022-04-08 10:40:55 +08:00
parent d4d9ce20cf
commit 57c574e38a
1 changed files with 1 additions and 1 deletions

View File

@ -267,7 +267,7 @@ static void trtrim(char *input, char *output, int32_t type, int32_t charLen) {
numOfSpaces++;
}
} else { //NCHAR
for (int32_t i = charLen - 1; i < charLen; ++i) {
for (int32_t i = charLen - 1; i >= 0; --i) {
if (!iswspace(*((uint32_t *)varDataVal(input) + i))) {
break;
}