Skip to content

Commit 71e8e65

Browse files
authored
chore(query): Optimize cast expr error display (#17710)
* cast display * cast display * test * fix * fix
1 parent 6c96171 commit 71e8e65

File tree

16 files changed

+335
-216
lines changed

16 files changed

+335
-216
lines changed

src/query/expression/src/block.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,15 @@ impl BlockEntry {
5656
pub fn new(data_type: DataType, value: Value<AnyType>) -> Self {
5757
#[cfg(debug_assertions)]
5858
{
59-
if let crate::Value::Column(c) = &value {
60-
c.check_valid().unwrap();
59+
use crate::Value;
60+
match &value {
61+
Value::Column(c) => {
62+
c.check_valid().unwrap();
63+
}
64+
Value::Scalar(_) => {
65+
check_type(&data_type, &value);
66+
}
6167
}
62-
check_type(&data_type, &value);
6368
}
6469

6570
Self { data_type, value }

0 commit comments

Comments
 (0)