QuenKar commented on code in PR #8478:
URL: https://github.com/apache/arrow-datafusion/pull/8478#discussion_r1421393737
##########
datafusion/sql/src/expr/value.rs:
##########
@@ -468,4 +469,38 @@ mod tests {
assert_eq!(output, expect);
}
}
+
+ #[test]
+ fn test_has_units() {
+ let cases = [
+ "1 century",
+ "1 centuries",
+ "1 decade",
+ "1 decades",
+ "1 year",
+ "1 years",
+ "1 month",
+ "1 months",
+ "1 week",
+ "1 weeks",
+ "1 day",
+ "1 days",
+ "1 hour",
+ "1 hours",
+ "1 minute",
+ "1 minutes",
+ "1 second",
+ "1 seconds",
+ "1 millisecond",
+ "1 milliseconds",
+ "1 microsecond",
+ "1 microseconds",
+ "1 nanosecond",
+ "1 nanoseconds",
+ ];
+ for case in cases {
+ assert!(has_units(case));
+ assert!(has_units(case.to_uppercase().as_str()));
+ }
+ }
Review Comment:
it's a little redundant, I will delete them.
--
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]