fix unicode support related bugs in s3select (#7877)

This commit is contained in:
Yao Zongyou
2019-07-06 00:43:10 +08:00
committed by Harshavardhana
parent bb871a7c31
commit 037319066f
4 changed files with 43 additions and 9 deletions

View File

@@ -196,7 +196,7 @@ func charlen(v *Value) (*Value, error) {
err := fmt.Errorf("%s/%s expects a string argument", sqlFnCharLength, sqlFnCharacterLength)
return nil, errIncorrectSQLFunctionArgumentType(err)
}
return FromInt(int64(len(s))), nil
return FromInt(int64(len([]rune(s)))), nil
}
func lowerCase(v *Value) (*Value, error) {