xiangfu0 commented on code in PR #11383:
URL: https://github.com/apache/pinot/pull/11383#discussion_r1298906395
##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MultiStageEngineIntegrationTest.java:
##########
@@ -101,6 +101,23 @@ public void testHardcodedQueries()
super.testHardcodedQueries();
}
+ @Test
+ public void testSingleValueQuery()
+ throws Exception {
+ String query = "select sum(ActualElapsedTime) from mytable WHERE
ActualElapsedTime > \n"
+ + "(select avg(ActualElapsedTime) as avg_profit from mytable) \n";
+ JsonNode jsonNode = postQuery(query);
Review Comment:
No,
Integration test result comparison needs to parse the query using v1 parser,
which throws exceptions.
```
Caused by: java.lang.ClassCastException: class
org.apache.calcite.sql.SqlSelect cannot be cast to class
org.apache.calcite.sql.SqlBasicCall (org.apache.calcite.sql.SqlSelect and
org.apache.calcite.sql.SqlBasicCall are in unnamed module of loader 'app')
at
org.apache.pinot.sql.parsers.CalciteSqlParser.toExpression(CalciteSqlParser.java:748)
at
org.apache.pinot.sql.parsers.CalciteSqlParser.compileFunctionExpression(CalciteSqlParser.java:810)
at
org.apache.pinot.sql.parsers.CalciteSqlParser.toExpression(CalciteSqlParser.java:748)
at
org.apache.pinot.sql.parsers.CalciteSqlParser.compileSqlNodeToPinotQuery(CalciteSqlParser.java:458)
at
org.apache.pinot.sql.parsers.CalciteSqlParser.compileToPinotQuery(CalciteSqlParser.java:191)
at
org.apache.pinot.sql.parsers.CalciteSqlParser.compileToPinotQuery(CalciteSqlParser.java:186)
at
org.apache.pinot.core.query.request.context.utils.QueryContextConverterUtils.getQueryContext(QueryContextConverterUtils.java:48)
at
org.apache.pinot.integration.tests.ClusterIntegrationTestUtils.testQueryInternal(ClusterIntegrationTestUtils.java:729)
at
org.apache.pinot.integration.tests.ClusterIntegrationTestUtils.testQuery(ClusterIntegrationTestUtils.java:677)
... 27 more
```
--
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]