Returns right n characters in the string, or when n is negative, returns all but first |n| characters. right('abcde', 2) = 'de' right('abcde', -2) = 'cde' The implementation uses UTF-8 code points as characters
(&self, args: ScalarFunctionArgs)
| 88 | /// right('abcde', -2) = 'cde' |
| 89 | /// The implementation uses UTF-8 code points as characters |
| 90 | fn invoke_with_args(&self, args: ScalarFunctionArgs) -> Result<ColumnarValue> { |
| 91 | let args = &args.args; |
| 92 | match args[0].data_type() { |
| 93 | DataType::Utf8 | DataType::Utf8View | DataType::LargeUtf8 => { |
| 94 | make_scalar_function(general_left_right::<RightSlicer>, vec![])(args) |
| 95 | } |
| 96 | other => exec_err!( |
| 97 | "Unsupported data type {other:?} for function {},\ |
| 98 | expected Utf8View, Utf8 or LargeUtf8.", |
| 99 | self.name() |
| 100 | ), |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | fn documentation(&self) -> Option<&Documentation> { |
| 105 | self.doc() |
nothing calls this directly
no test coverage detected