(&self, args: ScalarFunctionArgs)
| 117 | } |
| 118 | |
| 119 | fn invoke_with_args(&self, args: ScalarFunctionArgs) -> Result<ColumnarValue> { |
| 120 | let [expression, encoding] = take_function_args("encode", &args.args)?; |
| 121 | let encoding = Encoding::try_from(encoding)?; |
| 122 | match expression { |
| 123 | _ if expression.data_type().is_null() => { |
| 124 | Ok(ColumnarValue::Scalar(ScalarValue::Utf8(None))) |
| 125 | } |
| 126 | ColumnarValue::Array(array) => encode_array(array, encoding), |
| 127 | ColumnarValue::Scalar(scalar) => encode_scalar(scalar, encoding), |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | fn documentation(&self) -> Option<&Documentation> { |
| 132 | self.doc() |
nothing calls this directly
no test coverage detected