siddharthteotia commented on a change in pull request #6820:
URL: https://github.com/apache/incubator-pinot/pull/6820#discussion_r636270444
##########
File path:
pinot-common/src/test/java/org/apache/pinot/sql/parsers/CalciteSqlCompilerTest.java
##########
@@ -373,6 +374,15 @@ public void testBrokerConverterWithLiteral() {
Assert.assertEquals(tempBrokerRequest.getQuerySource().getTableName(),
"mytable");
Assert.assertEquals(tempBrokerRequest.getSelections().getSelectionColumns().get(0),
String.format("'%s'", literal.getFieldValue().toString()));
+
+ pinotQuery = CalciteSqlParser.compileToPinotQuery("select ago('PT1H') from
mytable");
+ literal = pinotQuery.getSelectList().get(0).getLiteral();
+ Assert.assertNotNull(literal);
+ converter = new PinotQuery2BrokerRequestConverter();
+ tempBrokerRequest = converter.convert(pinotQuery);
+ Assert.assertEquals(tempBrokerRequest.getQuerySource().getTableName(),
"mytable");
+
Assert.assertEquals(tempBrokerRequest.getSelections().getSelectionColumns().get(0),
+ String.format("'%s'", literal.getFieldValue().toString()));
Review comment:
Also add a test where ago() is used in filter expressions
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]