From 2473a083da8fdb00973b21bf09c16f3ae5bfd64f Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Thu, 21 Nov 2024 16:14:49 +0800 Subject: [PATCH] preserve source Signed-off-by: Bugen Zhao --- src/frontend/src/expr/function_call.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/expr/function_call.rs b/src/frontend/src/expr/function_call.rs index e6da13ccbbcea..d3c9c0dba2fd7 100644 --- a/src/frontend/src/expr/function_call.rs +++ b/src/frontend/src/expr/function_call.rs @@ -17,7 +17,7 @@ use risingwave_common::catalog::Schema; use risingwave_common::types::{DataType, ScalarImpl}; use risingwave_common::util::iter_util::ZipEqFast; use thiserror::Error; -use thiserror_ext::{AsReport, Box, Macro}; +use thiserror_ext::{Box, Macro}; use super::type_inference::cast; use super::{infer_some_all, infer_type, CastContext, Expr, ExprImpl, Literal}; @@ -434,9 +434,9 @@ pub struct CastErrorInner { pub type CastResult = Result; -// TODO(error-handling): do not use report string but directly make it a source of `ErrorCode`. +// TODO(error-handling): shall we make it a new variant? impl From for ErrorCode { fn from(value: CastError) -> Self { - ErrorCode::BindError(value.to_report_string()) + ErrorCode::Uncategorized(value.into()).into() } }