ashishjayamohan commented on code in PR #14385:
URL: https://github.com/apache/pinot/pull/14385#discussion_r1830324905
##########
pinot-core/src/test/java/org/apache/pinot/core/query/optimizer/filter/TimePredicateFilterOptimizerTest.java:
##########
@@ -147,14 +155,65 @@ public void testSDFToEpochDateTimeConvert() {
+ "1620830760000", new Range("2021-05-12", false, "2021-05-12",
true));
// Invalid time
- testInvalidTimeConvert(
+ testInvalidFilterOptimizer(
"dateTimeConvert(col, '1:MILLISECONDS:SIMPLE_DATE_FORMAT:yyyy-MM-dd
HH:mm:ss.SSS', '1:MILLISECONDS:EPOCH', "
+ "'30:MINUTES') > 1620830760000.5");
- testInvalidTimeConvert(
+ testInvalidFilterOptimizer(
"dateTimeConvert(col, '1:SECONDS:SIMPLE_DATE_FORMAT:yyyy-MM-dd
HH:mm:ss', '1:MILLISECONDS:EPOCH', "
+ "'30:MINUTES') < 1620917160");
}
+
+ @Test
+ public void testDateTruncOptimizer() {
+ testDateTrunc(
+ "datetrunc('DAY', col) < 1620777600000", new Range("0", true,
"1620777600000", false));
Review Comment:
Need to add tests covering the other invocations of dateTrunc
--
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]