mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-30 03:40:37 +00:00
feat: try cast timestamp types from number string (#6060)
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
@@ -107,6 +107,8 @@ fn parse_string_to_value(
|
||||
target_unit: t.unit(),
|
||||
},
|
||||
)?))
|
||||
} else if let Ok(ts) = i64::from_str(s.as_str()) {
|
||||
Ok(Value::Timestamp(Timestamp::new(ts, t.unit())))
|
||||
} else {
|
||||
ParseSqlValueSnafu {
|
||||
msg: format!("Failed to parse {s} to Timestamp value"),
|
||||
|
||||
Reference in New Issue
Block a user