alamb commented on code in PR #23316:
URL: https://github.com/apache/datafusion/pull/23316#discussion_r3522950523
##########
datafusion/core/src/execution/context/mod.rs:
##########
@@ -1374,14 +1381,20 @@ impl SessionContext {
let mut seconds = None;
for duration in duration.split_inclusive(&['m', 's']) {
- let (number, unit) = duration.split_at(duration.len() - 1);
+ let (unit_start, unit) =
+ duration.char_indices().next_back().ok_or_else(|| {
Review Comment:
does this check have a test?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]