Skip to content

Commit

Permalink
preserve source
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Nov 21, 2024
1 parent 969a58c commit 2473a08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/frontend/src/expr/function_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -434,9 +434,9 @@ pub struct CastErrorInner {

pub type CastResult<T = ()> = Result<T, CastError>;

// 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<CastError> for ErrorCode {
fn from(value: CastError) -> Self {
ErrorCode::BindError(value.to_report_string())
ErrorCode::Uncategorized(value.into()).into()
}
}

0 comments on commit 2473a08

Please sign in to comment.