feat: adds date_format function (#3167)

* feat: adds date_format function

* fix: compile error

* chore: use system timezone for FunctionContext and EvalContext

* test: as_formatted_string

* test: sqlness test

* chore: rename function
This commit is contained in:
dennis zhuang
2024-01-17 11:24:40 +08:00
committed by GitHub
parent d020a3db23
commit 204b9433b8
18 changed files with 651 additions and 61 deletions

View File

@@ -163,6 +163,12 @@ pub enum Error {
source: DataTypeError,
},
#[snafu(display("Failed to execute function: {source}"))]
Execute {
location: Location,
source: BoxedError,
},
#[snafu(display("Invalid function args: {}", err_msg))]
InvalidFuncArgs { err_msg: String, location: Location },
}
@@ -201,6 +207,7 @@ impl ErrorExt for Error {
Error::ConvertDfRecordBatchStream { source, .. } => source.status_code(),
Error::ExecutePhysicalPlan { source, .. } => source.status_code(),
Error::Execute { source, .. } => source.status_code(),
}
}