jorgecarleitao commented on a change in pull request #8660:
URL: https://github.com/apache/arrow/pull/8660#discussion_r523422039
##########
File path: rust/datafusion/src/physical_plan/expressions.rs
##########
@@ -969,6 +975,42 @@ macro_rules! compute_utf8_op {
}};
}
+/// Invoke a compute kernel on a data array and a scalar value
+macro_rules! compute_utf8_op_scalar {
+ ($LEFT:expr, $RIGHT:expr, $OP:ident, $DT:ident) => {{
+ let ll = $LEFT
+ .as_any()
+ .downcast_ref::<$DT>()
+ .expect("compute_op failed to downcast array");
+ if let ScalarValue::Utf8(Some(string_value)) = $RIGHT {
+ Ok(Arc::new(paste::expr! {[<$OP _utf8_scalar>]}(
+ &ll,
+ &string_value,
+ )?))
+ } else {
+ Err(ExecutionError::General(format!(
+ "compute_utf8_op_scalar failed to cast literal value {}",
Review comment:
We have an error for this: `Internal`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]