copr: remove nullable signature for expression like
@@ -7,22 +7,13 @@ use tidb_query_datatype::codec::collation::*;
use tidb_query_datatype::codec::data_type::*;
use tidb_query_shared_expr::*;
-#[rpn_fn(nullable)]
+#[rpn_fn]
#[inline]
-pub fn like<C: Collator>(
- target: Option<BytesRef>,
- pattern: Option<BytesRef>,
- escape: Option<&i64>,
-) -> Result<Option<i64>> {
- match (target, pattern, escape) {
- (Some(target), Some(pattern), Some(escape)) => {
+pub fn like<C: Collator>(target: BytesRef, pattern: BytesRef, escape: &i64) -> Result<Option<i64>> {
Ok(Some(
like::like::<C>(target, pattern, *escape as u32)? as i64
))
}
- _ => Ok(None),
- }
-}
#[cfg(test)]
mod tests {
