Skip to content

Commit 86495ea

Browse files
florannTCeason
authored andcommitted
Unit test 6
1 parent 0e38b10 commit 86495ea

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/query/functions/src/scalars/datetime.rs

-27
Original file line numberDiff line numberDiff line change
@@ -161,21 +161,9 @@ fn register_convert_timezone(registry: &mut FunctionRegistry) {
161161
"`target_tz` is `None`.".to_string(),
162162
);
163163
}
164-
Err(e) => {
165-
return ctx.set_error(
166-
output.len(),
167-
format!("cannot parse target `timezone`. {}", e),
168-
);
169-
}
170164
};
171165
let s_tz: Tz = match src_tz.parse() {
172166
Ok(tz) => tz,
173-
None => {
174-
return ctx.set_error(
175-
output.len(),
176-
"`src_tz` is `None`.".to_string(),
177-
);
178-
}
179167
Err(e) => {
180168
return ctx.set_error(
181169
output.len(),
@@ -188,12 +176,6 @@ fn register_convert_timezone(registry: &mut FunctionRegistry) {
188176
Ok(timestamp) => {
189177
timestamp.unwrap().Utc.timestamp_opt(src_timestamp, 0).unwrap();
190178
},
191-
None => {
192-
return ctx.set_error(
193-
output.len(),
194-
"source `src_timestamp` is `None`.".to_string(),
195-
);
196-
}
197179
Err(e) => {
198180
return ctx.set_error(
199181
output.len(),
@@ -242,20 +224,11 @@ fn register_convert_timezone(registry: &mut FunctionRegistry) {
242224
"source `src_timestamp` is `None`.".to_string(),
243225
);
244226
}
245-
Err(e) => {
246-
return ctx.set_error(
247-
output.len(),
248-
format!("cannot parse target `src_timestamp`. {}", e),
249-
);
250-
}
251227
};
252228

253229
// Parse the target timezone
254230
let t_tz: Tz = match target_tz.parse() {
255231
Ok(tz) => tz,
256-
None => {
257-
return ctx.set_error(output.len(), "`target_tz` is `None`.".to_string());
258-
}
259232
Err(e) => {
260233
return ctx.set_error(
261234
output.len(),

0 commit comments

Comments
 (0)