-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
type/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Description
Development Task
tikv/components/tidb_query_expr/src/lib.rs
Lines 360 to 378 in 1cd4753
| fn map_lower_sig(value: ScalarFuncSig, children: &[Expr]) -> Result<RpnFnMeta> { | |
| if children.len() != 1 { | |
| return Err(other_err!( | |
| "ScalarFunction {:?} (params = {}) is not supported in batch mode", | |
| value, | |
| children.len() | |
| )); | |
| } | |
| if children[0].get_field_type().is_binary_string_like() { | |
| Ok(lower_fn_meta()) | |
| } else { | |
| let ret_field_type = children[0].get_field_type(); | |
| Ok(match_template_charset! { | |
| TT, match Charset::from_name(ret_field_type.get_charset()).map_err(tidb_query_datatype::codec::Error::from)? { | |
| Charset::TT => lower_utf8_fn_meta::<TT>(), | |
| } | |
| }) | |
| } | |
| } |
The code above may change the function from
Lower to LowerUtf8 if the field type is not binary. It's not good because TiKV should respect the expression type received from TiDB.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.